NetNewsWire/Mac/AppAssets.swift

180 lines
7.1 KiB
Swift
Raw Normal View History

//
// AppAssets.swift
2018-08-29 07:18:24 +02:00
// NetNewsWire
//
// Created by Brent Simmons on 2/17/18.
// Copyright © 2018 Ranchero Software. All rights reserved.
//
import AppKit
import Account
struct AppAssets {
static let accountBazQux = NSImage(named: "accountBazQux")
2020-03-18 21:48:44 +01:00
static let accountCloudKit = NSImage(named: "accountCloudKit")
2019-05-01 13:49:50 +02:00
static let accountFeedbin = NSImage(named: "accountFeedbin")
2024-03-20 07:05:30 +01:00
static let accountFeedly = NSImage(named: "accountFeedly")
2019-09-20 21:47:40 +02:00
static let accountFreshRSS = NSImage(named: "accountFreshRSS")
2020-03-23 00:52:48 +01:00
static let accountInoreader = NSImage(named: "accountInoreader")
static let accountLocal = NSImage(named: "accountLocal")
static let accountNewsBlur = NSImage(named: "accountNewsBlur")
static let accountTheOldReader = NSImage(named: "accountTheOldReader")
2020-08-09 18:46:53 +02:00
2024-03-20 07:05:30 +01:00
static let addNewSidebarItemImage = NSImage(systemSymbolName: "plus", accessibilityDescription: nil)!
static let articleExtractorError = NSImage(named: "articleExtractorError")!
static let articleExtractorOff = NSImage(named: "articleExtractorOff")!
static let articleExtractorOn = NSImage(named: "articleExtractorOn")!
2024-03-20 07:05:30 +01:00
static let articleTheme = NSImage(systemSymbolName: "doc.richtext", accessibilityDescription: nil)!
2020-08-10 16:45:48 +02:00
2024-03-20 07:05:30 +01:00
static let cleanUpImage = NSImage(systemSymbolName: "wind", accessibilityDescription: nil)!
static let marsEditIcon = NSImage(named: "MarsEditIcon")!
static let microblogIcon = NSImage(named: "MicroblogIcon")!
static let faviconTemplateImage = NSImage(named: "faviconTemplateImage")!
2024-03-20 07:05:30 +01:00
static let filterActive = NSImage(systemSymbolName: "line.horizontal.3.decrease.circle.fill", accessibilityDescription: nil)!
static let filterInactive = NSImage(systemSymbolName: "line.horizontal.3.decrease.circle", accessibilityDescription: nil)!
static let iconLightBackgroundColor = NSColor(named: NSColor.Name("iconLightBackgroundColor"))!
static let iconDarkBackgroundColor = NSColor(named: NSColor.Name("iconDarkBackgroundColor"))!
static let legacyArticleExtractor = NSImage(named: "legacyArticleExtractor")!
2024-03-20 07:05:30 +01:00
static let legacyArticleExtractorError = NSImage(named: "legacyArticleExtractorError")!
2024-03-20 07:05:30 +01:00
static let legacyArticleExtractorInactiveDark = NSImage(named: "legacyArticleExtractorInactiveDark")!
2024-03-20 07:05:30 +01:00
static let legacyArticleExtractorInactiveLight = NSImage(named: "legacyArticleExtractorInactiveLight")!
2024-03-20 07:05:30 +01:00
static let legacyArticleExtractorProgress1 = NSImage(named: "legacyArticleExtractorProgress1")
2024-03-20 07:05:30 +01:00
static let legacyArticleExtractorProgress2 = NSImage(named: "legacyArticleExtractorProgress2")
2024-03-20 07:05:30 +01:00
static let legacyArticleExtractorProgress3 = NSImage(named: "legacyArticleExtractorProgress3")
2024-03-20 07:05:30 +01:00
static let legacyArticleExtractorProgress4 = NSImage(named: "legacyArticleExtractorProgress4")
2024-03-20 07:05:30 +01:00
@MainActor
2024-03-20 07:05:30 +01:00
static let folderImage: IconImage = {
let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)!
let preferredColor = NSColor(named: "AccentColor")!
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
}()
static let markAllAsReadImage = NSImage(named: "markAllAsRead")!
2024-03-20 07:05:30 +01:00
static let nextUnreadImage = NSImage(systemSymbolName: "chevron.down.circle", accessibilityDescription: nil)!
2020-08-10 16:45:48 +02:00
2024-03-20 07:05:30 +01:00
static let openInBrowserImage = NSImage(systemSymbolName: "safari", accessibilityDescription: nil)!
2020-08-10 16:45:48 +02:00
2024-03-20 07:05:30 +01:00
static let preferencesToolbarAccountsImage = NSImage(systemSymbolName: "at", accessibilityDescription: nil)!
2024-03-20 07:05:30 +01:00
static let preferencesToolbarGeneralImage = NSImage(systemSymbolName: "gearshape", accessibilityDescription: nil)!
2024-03-20 07:05:30 +01:00
static let preferencesToolbarAdvancedImage = NSImage(systemSymbolName: "gearshape.2", accessibilityDescription: nil)!
2024-03-20 07:05:30 +01:00
static let readClosedImage = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
2024-03-20 07:05:30 +01:00
static let readOpenImage = NSImage(systemSymbolName: "circle", accessibilityDescription: nil)!
2024-03-20 07:05:30 +01:00
static let refreshImage = NSImage(systemSymbolName: "arrow.clockwise", accessibilityDescription: nil)!
@MainActor
2024-03-20 07:05:30 +01:00
static let searchFeedImage: IconImage = {
return IconImage(NSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSupressed: true)
}()
2020-08-10 16:45:48 +02:00
2024-03-20 07:05:30 +01:00
static let shareImage = NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: nil)!
2024-03-20 07:05:30 +01:00
static let sidebarToggleImage = NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: nil)!
2024-03-20 07:05:30 +01:00
static let starClosedImage = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
static let starOpenImage = NSImage(systemSymbolName: "star", accessibilityDescription: nil)!
@MainActor
2024-03-20 07:05:30 +01:00
static let starredFeedImage: IconImage = {
let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
let preferredColor = NSColor(named: "StarColor")!
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
}()
2024-03-20 07:05:30 +01:00
static let timelineSeparatorColor = NSColor(named: "timelineSeparatorColor")!
static let timelineStarSelected = NSImage(named: "timelineStar")?.tinted(with: .white)
2024-03-20 07:05:30 +01:00
static let timelineStarUnselected = NSImage(named: "timelineStar")?.tinted(with: starColor)
@MainActor
2024-03-20 07:05:30 +01:00
static let todayFeedImage: IconImage = {
let image = NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)!
let preferredColor = NSColor.orange
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
}()
@MainActor
2024-03-20 07:05:30 +01:00
static let unreadFeedImage: IconImage = {
let image = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
let preferredColor = NSColor(named: "AccentColor")!
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
}()
static let swipeMarkReadImage = NSImage(systemSymbolName: "circle", accessibilityDescription: "Mark Read")!
.withSymbolConfiguration(.init(scale: .large))
static let swipeMarkUnreadImage = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: "Mark Unread")!
.withSymbolConfiguration(.init(scale: .large))
static let swipeMarkStarredImage = NSImage(systemSymbolName: "star.fill", accessibilityDescription: "Star")!
.withSymbolConfiguration(.init(scale: .large))
static let swipeMarkUnstarredImage = NSImage(systemSymbolName: "star", accessibilityDescription: "Unstar")!
.withSymbolConfiguration(.init(scale: .large))!
2024-03-20 07:05:30 +01:00
static let starColor = NSColor(named: NSColor.Name("StarColor"))!
static func image(for accountType: AccountType) -> NSImage? {
switch accountType {
case .onMyMac:
return AppAssets.accountLocal
2020-03-18 21:48:44 +01:00
case .cloudKit:
return AppAssets.accountCloudKit
case .bazQux:
return AppAssets.accountBazQux
case .feedbin:
return AppAssets.accountFeedbin
case .feedly:
return AppAssets.accountFeedly
case .freshRSS:
return AppAssets.accountFreshRSS
case .inoreader:
return AppAssets.accountInoreader
2020-03-23 00:52:48 +01:00
case .newsBlur:
return AppAssets.accountNewsBlur
case .theOldReader:
return AppAssets.accountTheOldReader
}
}
}