diff --git a/Vienna/Sources/Application/AppController.m b/Vienna/Sources/Application/AppController.m index 3c935316c5..3fd38d9a13 100644 --- a/Vienna/Sources/Application/AppController.m +++ b/Vienna/Sources/Application/AppController.m @@ -1303,7 +1303,13 @@ - (void)initScriptsMenu { } scriptsMenuItem = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""]; - scriptsMenuItem.image = [NSImage imageNamed:@"NSScriptTemplate"]; + if (@available(macOS 11, *)) { + scriptsMenuItem.image = [NSImage imageWithSystemSymbolName:@"applescript.fill" + accessibilityDescription:nil]; + } else { + // This image is available in AppKit, but not as a constant. + scriptsMenuItem.image = [NSImage imageNamed:@"NSScriptTemplate"]; + } NSInteger helpMenuIndex = NSApp.mainMenu.numberOfItems - 1; [NSApp.mainMenu insertItem:scriptsMenuItem atIndex:helpMenuIndex]; diff --git a/Vienna/Sources/Main window/ArticleListView.m b/Vienna/Sources/Main window/ArticleListView.m index 1a3b771418..aad944f1c2 100644 --- a/Vienna/Sources/Main window/ArticleListView.m +++ b/Vienna/Sources/Main window/ArticleListView.m @@ -605,7 +605,9 @@ -(void)showSortDirection for (NSTableColumn * column in articleList.tableColumns) { if ([column.identifier isEqualToString:sortColumnIdentifier]) { - NSString * imageName = ([[Preferences standardPreferences].articleSortDescriptors[0] ascending]) ? @"NSAscendingSortIndicator" : @"NSDescendingSortIndicator"; + // These NSImage names are available in AppKit, but not as constants. + // https://developer.apple.com/library/archive/releasenotes/AppKit/RN-AppKitOlderNotes/ + NSImageName imageName = ([Preferences.standardPreferences.articleSortDescriptors[0] ascending]) ? @"NSAscendingSortIndicator" : @"NSDescendingSortIndicator"; articleList.highlightedTableColumn = column; [articleList setIndicatorImage:[NSImage imageNamed:imageName] inTableColumn:column]; } else { diff --git a/Vienna/Sources/Preferences window/PreferenceTabViewItem.swift b/Vienna/Sources/Preferences window/PreferenceTabViewItem.swift index a5567ebec2..24d9df2d26 100644 --- a/Vienna/Sources/Preferences window/PreferenceTabViewItem.swift +++ b/Vienna/Sources/Preferences window/PreferenceTabViewItem.swift @@ -36,12 +36,12 @@ class PreferenceTabViewItem: NSTabViewItem { } switch identifier as? String { - case .some("general"): - image = NSImage(named: "NSPreferencesGeneral") - case .some("updates"): - image = NSImage(named: "NSNetwork") - case .some("advanced"): - image = NSImage(named: "NSAdvanced") + case "general": + image = NSImage(named: NSImage.preferencesGeneralName) + case "updates": + image = NSImage(named: NSImage.networkName) + case "advanced": + image = NSImage(named: NSImage.advancedName) default: return }