mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Finish migration away from AppAssets to AppImage and AppColor.
This commit is contained in:
@@ -15,6 +15,8 @@ import UIKit
|
||||
|
||||
struct AppColor {
|
||||
|
||||
static var accent = color(isMac ? "AccentColor" : "primaryAccentColor")
|
||||
static var star = color(isMac ? "StarColor" : "starColor")
|
||||
}
|
||||
|
||||
// MARK: - Mac
|
||||
@@ -33,7 +35,13 @@ extension AppColor {
|
||||
extension AppColor {
|
||||
|
||||
#if os(iOS)
|
||||
static var controlBackground = color("controlBackgroundColor")
|
||||
static var fullScreenBackground = color("fullScreenBackgroundColor")
|
||||
static var iconBackground = color("iconBackgroundColor")
|
||||
static var secondaryAccent = color("secondaryAccentColor")
|
||||
static var sectionHeader = color("sectionHeaderColor")
|
||||
static var tickMark = color("tickMarkColor")
|
||||
static var vibrantText = color("vibrantTextColor")
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -41,6 +49,14 @@ extension AppColor {
|
||||
|
||||
private extension AppColor {
|
||||
|
||||
#if os(macOS)
|
||||
static var isMac = true
|
||||
static var isiOS = false
|
||||
#elseif os(iOS)
|
||||
static var isMac = false
|
||||
static var isiOS = true
|
||||
#endif
|
||||
|
||||
#if os(macOS)
|
||||
static func color(_ name: String) -> NSColor {
|
||||
NSColor(named: name)!
|
||||
|
||||
Reference in New Issue
Block a user