Continue converting AppAssets to AppAsset.

This commit is contained in:
Brent Simmons 2024-10-01 13:43:38 -07:00
parent f756b8f4ef
commit 8d5bd91c74
3 changed files with 9 additions and 8 deletions

View File

@ -14,11 +14,6 @@ import Images
extension AppAsset {
struct Mac {
struct PreferencesToolbar {
static let accounts = RSImage.systemImage("at")
static let general = RSImage.systemImage("gearshape")
static let advanced = RSImage.systemImage("gearshape.2")
}
struct Timeline {
static let swipeMarkRead = NSImage(systemSymbolName: "circle", accessibilityDescription: "Mark Read")!

View File

@ -35,10 +35,10 @@ class PreferencesWindowController : NSWindowController, NSToolbarDelegate {
var specs = [PreferencesToolbarItemSpec]()
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.General,
name: NSLocalizedString("General", comment: "Preferences"),
image: AppAsset.Mac.PreferencesToolbar.general)]
image: AppAsset.preferencesToolbarGeneralImage)]
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.Accounts,
name: NSLocalizedString("Accounts", comment: "Preferences"),
image: AppAsset.Mac.PreferencesToolbar.accounts)]
image: AppAsset.preferencesToolbarAccountsImage)]
// Omit the Advanced Preferences for now because the Software Update related functionality is
// forbidden/non-applicable, and we can rely upon Apple to some extent for crash reports. We
@ -47,7 +47,7 @@ class PreferencesWindowController : NSWindowController, NSToolbarDelegate {
#if !MAC_APP_STORE
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.Advanced,
name: NSLocalizedString("Advanced", comment: "Preferences"),
image: AppAsset.Mac.PreferencesToolbar.advanced)]
image: AppAsset.preferencesToolbarAdvancedImage)]
#endif
return specs
}()

View File

@ -138,6 +138,12 @@ extension AppAsset {
static let toolbarReadClosedImage = RSImage.systemImage("largecircle.fill.circle")
static let toolbarReadOpenImage = RSImage.systemImage("circle")
static let toolbarShareImage = AppAsset.shareImage
// MARK: - Mac Preferences Toolbar
static let preferencesToolbarAccountsImage = RSImage.systemImage("at")
static let preferencesToolbarGeneralImage = RSImage.systemImage("gearshape")
static let preferencesToolbarAdvancedImage = RSImage.systemImage("gearshape.2")
}
#endif