mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Complete switch on Mac from AppAssets to AppAsset.
This commit is contained in:
@@ -16,7 +16,7 @@ import Core
|
||||
import Account
|
||||
import Images
|
||||
|
||||
final class AppAsset {
|
||||
@MainActor final class AppAsset {
|
||||
|
||||
static let markAllAsReadImage = RSImage.appImage("markAllAsRead")
|
||||
static let faviconTemplateImage = RSImage.appImage("faviconTemplateImage")
|
||||
@@ -24,28 +24,8 @@ final class AppAsset {
|
||||
|
||||
static let starColor = RSColor(named: "starColor")!
|
||||
|
||||
@MainActor static let folderIcon: IconImage = {
|
||||
|
||||
#if os(macOS)
|
||||
let image = RSImage.systemImage("folder")
|
||||
let preferredColor = NSColor(named: "AccentColor")!
|
||||
let coloredImage = image.tinted(with: preferredColor)
|
||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
#else
|
||||
let image = RSImage.systemImage("folder.fill")
|
||||
let preferredColor = AppAssets.secondaryAccentColor
|
||||
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
#endif
|
||||
}()
|
||||
|
||||
@MainActor static let searchFeedImage: IconImage = {
|
||||
|
||||
#if os(macOS)
|
||||
IconImage(NSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSupressed: true)
|
||||
#else
|
||||
IconImage(UIImage(systemName: "magnifyingglass")!, isSymbol: true)
|
||||
#endif
|
||||
}()
|
||||
static let starOpenImage = RSImage.systemImage("star")
|
||||
static let starClosedImage = RSImage.systemImage("star.fill")
|
||||
|
||||
// MARK: - ArticleExtractor
|
||||
|
||||
@@ -59,11 +39,8 @@ final class AppAsset {
|
||||
|
||||
static let filterActiveImage = RSImage.systemImage("line.horizontal.3.decrease.circle.fill")
|
||||
static let filterInactiveImage = RSImage.systemImage("line.horizontal.3.decrease.circle")
|
||||
}
|
||||
|
||||
// MARK: - Account
|
||||
|
||||
extension AppAsset {
|
||||
// MARK: - Account
|
||||
|
||||
static let bazQuxImage = RSImage.appImage("accountBazQux")
|
||||
static let cloudKitImage = RSImage.appImage("accountCloudKit")
|
||||
@@ -77,7 +54,7 @@ extension AppAsset {
|
||||
static let newsBlurImage = RSImage.appImage("accountNewsBlur")
|
||||
static let theOldReaderImage = RSImage.appImage("accountTheOldReader")
|
||||
|
||||
@MainActor static func accountImage(for accountType: AccountType) -> RSImage {
|
||||
static func accountImage(for accountType: AccountType) -> RSImage {
|
||||
|
||||
switch accountType {
|
||||
case .onMyMac:
|
||||
@@ -111,39 +88,3 @@ extension AppAsset {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if os(macOS)
|
||||
|
||||
// MARK: - Mac
|
||||
|
||||
extension AppAsset {
|
||||
|
||||
static let iconLightBackgroundColor = NSColor(named: "iconLightBackgroundColor")!
|
||||
static let iconDarkBackgroundColor = NSColor(named: "iconDarkBackgroundColor")!
|
||||
|
||||
// MARK: - Mac Share Menu
|
||||
|
||||
static let marsEditImage = RSImage.appImage("MarsEditIcon")
|
||||
static let microblogImage = RSImage.appImage("MicroblogIcon")
|
||||
|
||||
// MARK: - Mac Toolbar
|
||||
|
||||
static let toolbarAddNewSidebarItemImage = RSImage.systemImage("plus")
|
||||
static let toolbarRefreshImage = RSImage.systemImage("arrow.clockwise")
|
||||
static let toolbarArticleThemeImage = RSImage.systemImage("doc.richtext")
|
||||
static let toolbarCleanUpImage = RSImage.systemImage("wind")
|
||||
static let toolbarNextUnreadImage = RSImage.systemImage("chevron.down.circle")
|
||||
static let toolbarOpenInBrowserImage = RSImage.systemImage("safari")
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user