diff --git a/NEWS.md b/NEWS.md index 6172c8e22..7568cbc07 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,29 @@ +## [Transmission 3.10](https://github.com/transmission/transmission/releases/tag/3.10) (2020-mm-dd) + +### All Platforms +- + +### Mac Client +- Updates for macOS 11 Big Sur ([#1535](https://github.com/transmission/transmission/pull/1535) + - Compressed toolbar + - Red accent color + - Updated toolbar icons (using SF Symbol) + +### GTK+ Client +- + +### Qt Client +- + +### Daemon +- + +### Web Client +- + +### Utils +- + ## [Transmission 3.00](https://github.com/transmission/transmission/releases/tag/3.00) (2020-05-03) ### All Platforms diff --git a/Transmission.xcodeproj/project.pbxproj b/Transmission.xcodeproj/project.pbxproj index dcc88ad80..3e029c3ff 100644 --- a/Transmission.xcodeproj/project.pbxproj +++ b/Transmission.xcodeproj/project.pbxproj @@ -3047,6 +3047,7 @@ 0053D3DA0C86774200545606 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "Accent Color"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; @@ -3193,6 +3194,7 @@ 4DF0C59D089918A300DD8943 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "Accent Color"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; @@ -3273,6 +3275,7 @@ A250CFEB0CDA19680068B4B6 /* Release - Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "Accent Color"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; diff --git a/macosx/Controller.m b/macosx/Controller.m index b7e212f24..99b17772c 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -500,6 +500,11 @@ static void removeKeRangerRansomware() "Main window -> 1st bottom left button (action) tooltip")]; [fSpeedLimitButton setToolTip: NSLocalizedString(@"Speed Limit overrides the total bandwidth limits with its own limits.", "Main window -> 2nd bottom left button (turtle) tooltip")]; + if (@available(macOS 11.0, *)) { + [fActionButton setImage:[NSImage imageWithSystemSymbolName: @"gearshape.fill" accessibilityDescription: nil]]; + [fSpeedLimitButton setImage:[NSImage imageWithSystemSymbolName: @"tortoise.fill" accessibilityDescription: nil]]; + } + [fClearCompletedButton setToolTip: NSLocalizedString(@"Remove all transfers that have completed seeding.", "Main window -> 3rd bottom left button (remove all) tooltip")]; @@ -3643,9 +3648,13 @@ static void removeKeRangerRansomware() [item setView: button]; - const NSSize buttonSize = NSMakeSize(36.0, 25.0); - [item setMinSize: buttonSize]; - [item setMaxSize: buttonSize]; + if (@available(macOS 11.0, *)) { + // not needed + } else { + const NSSize buttonSize = NSMakeSize(36.0, 25.0); + [item setMinSize: buttonSize]; + [item setMaxSize: buttonSize]; + } return item; } @@ -3659,7 +3668,11 @@ static void removeKeRangerRansomware() [item setLabel: NSLocalizedString(@"Create", "Create toolbar item -> label")]; [item setPaletteLabel: NSLocalizedString(@"Create Torrent File", "Create toolbar item -> palette label")]; [item setToolTip: NSLocalizedString(@"Create torrent file", "Create toolbar item -> tooltip")]; - [item setImage: [NSImage imageNamed: @"ToolbarCreateTemplate"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"doc.badge.plus" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"ToolbarCreateTemplate"]]; + } [item setTarget: self]; [item setAction: @selector(createFile:)]; [item setAutovalidates: NO]; @@ -3673,7 +3686,11 @@ static void removeKeRangerRansomware() [item setLabel: NSLocalizedString(@"Open", "Open toolbar item -> label")]; [item setPaletteLabel: NSLocalizedString(@"Open Torrent Files", "Open toolbar item -> palette label")]; [item setToolTip: NSLocalizedString(@"Open torrent files", "Open toolbar item -> tooltip")]; - [item setImage: [NSImage imageNamed: @"ToolbarOpenTemplate"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"folder" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"ToolbarOpenTemplate"]]; + } [item setTarget: self]; [item setAction: @selector(openShowSheet:)]; [item setAutovalidates: NO]; @@ -3688,6 +3705,11 @@ static void removeKeRangerRansomware() [item setPaletteLabel: NSLocalizedString(@"Open Torrent Address", "Open address toolbar item -> palette label")]; [item setToolTip: NSLocalizedString(@"Open torrent web address", "Open address toolbar item -> tooltip")]; [item setImage: [NSImage imageNamed: @"ToolbarOpenWebTemplate"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"globe" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"ToolbarOpenWebTemplate"]]; + } [item setTarget: self]; [item setAction: @selector(openURLShowSheet:)]; [item setAutovalidates: NO]; @@ -3701,7 +3723,11 @@ static void removeKeRangerRansomware() [item setLabel: NSLocalizedString(@"Remove", "Remove toolbar item -> label")]; [item setPaletteLabel: NSLocalizedString(@"Remove Selected", "Remove toolbar item -> palette label")]; [item setToolTip: NSLocalizedString(@"Remove selected transfers", "Remove toolbar item -> tooltip")]; - [item setImage: [NSImage imageNamed: @"ToolbarRemoveTemplate"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"nosign" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"ToolbarRemoveTemplate"]]; + } [item setTarget: self]; [item setAction: @selector(removeNoDelete:)]; [item setVisibilityPriority: NSToolbarItemVisibilityPriorityHigh]; @@ -3716,7 +3742,11 @@ static void removeKeRangerRansomware() [item setLabel: NSLocalizedString(@"Inspector", "Inspector toolbar item -> label")]; [item setPaletteLabel: NSLocalizedString(@"Toggle Inspector", "Inspector toolbar item -> palette label")]; [item setToolTip: NSLocalizedString(@"Toggle the torrent inspector", "Inspector toolbar item -> tooltip")]; - [item setImage: [NSImage imageNamed: @"ToolbarInfoTemplate"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"info.circle" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"ToolbarInfoTemplate"]]; + } [item setTarget: self]; [item setAction: @selector(showInfo:)]; @@ -3738,9 +3768,13 @@ static void removeKeRangerRansomware() [segmentedControl setSegmentCount: 2]; [segmentedCell setTrackingMode: NSSegmentSwitchTrackingMomentary]; - const NSSize groupSize = NSMakeSize(72.0, 25.0); - [groupItem setMinSize: groupSize]; - [groupItem setMaxSize: groupSize]; + if (@available(macOS 11.0, *)) { + // not needed + } else { + const NSSize groupSize = NSMakeSize(72.0, 25.0); + [groupItem setMinSize: groupSize]; + [groupItem setMaxSize: groupSize]; + } [groupItem setLabel: NSLocalizedString(@"Apply All", "All toolbar item -> label")]; [groupItem setPaletteLabel: NSLocalizedString(@"Pause / Resume All", "All toolbar item -> palette label")]; @@ -3750,12 +3784,21 @@ static void removeKeRangerRansomware() [groupItem setIdentifiers: @[TOOLBAR_PAUSE_ALL, TOOLBAR_RESUME_ALL]]; [segmentedCell setTag: TOOLBAR_PAUSE_TAG forSegment: TOOLBAR_PAUSE_TAG]; - [segmentedControl setImage: [NSImage imageNamed: @"ToolbarPauseAllTemplate"] forSegment: TOOLBAR_PAUSE_TAG]; + if (@available(macOS 11.0, *)) { + [segmentedControl setImage: [[NSImage imageWithSystemSymbolName: @"pause.circle.fill" accessibilityDescription: nil] imageWithSymbolConfiguration:[NSImageSymbolConfiguration configurationWithScale:NSImageSymbolScaleLarge]] forSegment: TOOLBAR_PAUSE_TAG]; + } else { + [segmentedControl setImage: [NSImage imageNamed: @"ToolbarPauseAllTemplate"] forSegment: TOOLBAR_PAUSE_TAG]; + } [segmentedCell setToolTip: NSLocalizedString(@"Pause all transfers", "All toolbar item -> tooltip") forSegment: TOOLBAR_PAUSE_TAG]; [segmentedCell setTag: TOOLBAR_RESUME_TAG forSegment: TOOLBAR_RESUME_TAG]; [segmentedControl setImage: [NSImage imageNamed: @"ToolbarResumeAllTemplate"] forSegment: TOOLBAR_RESUME_TAG]; + if (@available(macOS 11.0, *)) { + [segmentedControl setImage: [[NSImage imageWithSystemSymbolName: @"arrow.clockwise.circle.fill" accessibilityDescription: nil] imageWithSymbolConfiguration:[NSImageSymbolConfiguration configurationWithScale:NSImageSymbolScaleLarge]] forSegment: TOOLBAR_RESUME_TAG]; + } else { + [segmentedControl setImage: [NSImage imageNamed: @"ToolbarResumeAllTemplate"] forSegment: TOOLBAR_RESUME_TAG]; + } [segmentedCell setToolTip: NSLocalizedString(@"Resume all transfers", "All toolbar item -> tooltip") forSegment: TOOLBAR_RESUME_TAG]; @@ -3783,9 +3826,13 @@ static void removeKeRangerRansomware() [segmentedControl setSegmentCount: 2]; [segmentedCell setTrackingMode: NSSegmentSwitchTrackingMomentary]; - const NSSize groupSize = NSMakeSize(72.0, 25.0); - [groupItem setMinSize: groupSize]; - [groupItem setMaxSize: groupSize]; + if (@available(macOS 11.0, *)) { + // not needed + } else { + const NSSize groupSize = NSMakeSize(72.0, 25.0); + [groupItem setMinSize: groupSize]; + [groupItem setMaxSize: groupSize]; + } [groupItem setLabel: NSLocalizedString(@"Apply Selected", "Selected toolbar item -> label")]; [groupItem setPaletteLabel: NSLocalizedString(@"Pause / Resume Selected", "Selected toolbar item -> palette label")]; @@ -3795,12 +3842,20 @@ static void removeKeRangerRansomware() [groupItem setIdentifiers: @[TOOLBAR_PAUSE_SELECTED, TOOLBAR_RESUME_SELECTED]]; [segmentedCell setTag: TOOLBAR_PAUSE_TAG forSegment: TOOLBAR_PAUSE_TAG]; - [segmentedControl setImage: [NSImage imageNamed: @"ToolbarPauseSelectedTemplate"] forSegment: TOOLBAR_PAUSE_TAG]; + if (@available(macOS 11.0, *)) { + [segmentedControl setImage: [[NSImage imageWithSystemSymbolName: @"pause" accessibilityDescription: nil] imageWithSymbolConfiguration:[NSImageSymbolConfiguration configurationWithScale:NSImageSymbolScaleLarge]] forSegment: TOOLBAR_PAUSE_TAG]; + } else { + [segmentedControl setImage: [NSImage imageNamed: @"ToolbarPauseSelectedTemplate"] forSegment: TOOLBAR_PAUSE_TAG]; + } [segmentedCell setToolTip: NSLocalizedString(@"Pause selected transfers", "Selected toolbar item -> tooltip") forSegment: TOOLBAR_PAUSE_TAG]; [segmentedCell setTag: TOOLBAR_RESUME_TAG forSegment: TOOLBAR_RESUME_TAG]; - [segmentedControl setImage: [NSImage imageNamed: @"ToolbarResumeSelectedTemplate"] forSegment: TOOLBAR_RESUME_TAG]; + if (@available(macOS 11.0, *)) { + [segmentedControl setImage: [NSImage imageWithSystemSymbolName: @"arrow.clockwise" accessibilityDescription: nil] forSegment: TOOLBAR_RESUME_TAG]; + } else { + [segmentedControl setImage: [NSImage imageNamed: @"ToolbarResumeSelectedTemplate"] forSegment: TOOLBAR_RESUME_TAG]; + } [segmentedCell setToolTip: NSLocalizedString(@"Resume selected transfers", "Selected toolbar item -> tooltip") forSegment: TOOLBAR_RESUME_TAG]; @@ -3820,7 +3875,11 @@ static void removeKeRangerRansomware() [item setLabel: NSLocalizedString(@"Filter", "Filter toolbar item -> label")]; [item setPaletteLabel: NSLocalizedString(@"Toggle Filter", "Filter toolbar item -> palette label")]; [item setToolTip: NSLocalizedString(@"Toggle the filter bar", "Filter toolbar item -> tooltip")]; - [item setImage: [NSImage imageNamed: @"ToolbarFilterTemplate"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"magnifyingglass" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"ToolbarFilterTemplate"]]; + } [item setTarget: self]; [item setAction: @selector(toggleFilterBar:)]; @@ -3897,10 +3956,8 @@ static void removeKeRangerRansomware() return @[ TOOLBAR_CREATE, TOOLBAR_OPEN_FILE, TOOLBAR_OPEN_WEB, TOOLBAR_REMOVE, TOOLBAR_PAUSE_RESUME_SELECTED, TOOLBAR_PAUSE_RESUME_ALL, TOOLBAR_SHARE, TOOLBAR_QUICKLOOK, TOOLBAR_FILTER, TOOLBAR_INFO, - NSToolbarSeparatorItemIdentifier, NSToolbarSpaceItemIdentifier, - NSToolbarFlexibleSpaceItemIdentifier, - NSToolbarCustomizeToolbarItemIdentifier ]; + NSToolbarFlexibleSpaceItemIdentifier ]; } - (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar diff --git a/macosx/Images/Images.xcassets/Accent Color.colorset/Contents.json b/macosx/Images/Images.xcassets/Accent Color.colorset/Contents.json new file mode 100644 index 000000000..dc5a28c23 --- /dev/null +++ b/macosx/Images/Images.xcassets/Accent Color.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "19", + "green" : "36", + "red" : "224" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "20", + "green" : "37", + "red" : "234" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macosx/Images/Images.xcassets/Contents.json b/macosx/Images/Images.xcassets/Contents.json index da4a164c9..73c00596a 100644 --- a/macosx/Images/Images.xcassets/Contents.json +++ b/macosx/Images/Images.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index 5be411dd0..cf1a6e963 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -236,7 +236,11 @@ if ([ident isEqualToString: TOOLBAR_GENERAL]) { [item setLabel: NSLocalizedString(@"General", "Preferences -> toolbar item title")]; - [item setImage: [NSImage imageNamed: NSImageNamePreferencesGeneral]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"gearshape" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: NSImageNamePreferencesGeneral]]; + } [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -245,6 +249,11 @@ { [item setLabel: NSLocalizedString(@"Transfers", "Preferences -> toolbar item title")]; [item setImage: [NSImage imageNamed: @"Transfers"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"arrow.up.arrow.down" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"Transfers"]]; + } [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -253,6 +262,11 @@ { [item setLabel: NSLocalizedString(@"Groups", "Preferences -> toolbar item title")]; [item setImage: [NSImage imageNamed: @"Groups"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"pin" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"Groups"]]; + } [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -261,6 +275,11 @@ { [item setLabel: NSLocalizedString(@"Bandwidth", "Preferences -> toolbar item title")]; [item setImage: [NSImage imageNamed: @"Bandwidth"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"speedometer" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"Bandwidth"]]; + } [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -269,6 +288,11 @@ { [item setLabel: NSLocalizedString(@"Peers", "Preferences -> toolbar item title")]; [item setImage: [NSImage imageNamed: NSImageNameUserGroup]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"person.2" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: NSImageNameUserGroup]]; + } [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -276,7 +300,11 @@ else if ([ident isEqualToString: TOOLBAR_NETWORK]) { [item setLabel: NSLocalizedString(@"Network", "Preferences -> toolbar item title")]; - [item setImage: [NSImage imageNamed: NSImageNameNetwork]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"network" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: NSImageNameNetwork]]; + } [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -284,7 +312,11 @@ else if ([ident isEqualToString: TOOLBAR_REMOTE]) { [item setLabel: NSLocalizedString(@"Remote", "Preferences -> toolbar item title")]; - [item setImage: [NSImage imageNamed: @"Remote"]]; + if (@available(macOS 11.0, *)) { + [item setImage: [NSImage imageWithSystemSymbolName: @"antenna.radiowaves.left.and.right" accessibilityDescription: nil]]; + } else { + [item setImage: [NSImage imageNamed: @"Remote"]]; + } [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; diff --git a/macosx/PrefsWindow.m b/macosx/PrefsWindow.m index d7a4fc259..8d288b494 100644 --- a/macosx/PrefsWindow.m +++ b/macosx/PrefsWindow.m @@ -24,6 +24,14 @@ @implementation PrefsWindow +- (void)awakeFromNib { + [super awakeFromNib]; + + if (@available(macOS 11.0, *)) { + self.toolbarStyle = NSWindowToolbarStylePreference; + } +} + - (void) keyDown: (NSEvent *) event { if ([event keyCode] == 53) //esc key diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index ad0f5ac41..9d161dbf1 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -77,6 +77,10 @@ [self setDelegate: self]; fPiecesBarPercent = [fDefaults boolForKey: @"PiecesBar"] ? 1.0 : 0.0; + + if (@available(macOS 11.0, *)) { + self.style = NSTableViewStyleFullWidth; + } } return self;