Update the preferences window to use SF Symbols

This commit is contained in:
Mitchell Livingston 2020-11-21 08:27:38 -05:00
parent b51fd847e7
commit 21f173904a
1 changed files with 35 additions and 3 deletions

View File

@ -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];