Finish migration away from AppAssets to AppImage and AppColor.

This commit is contained in:
Brent Simmons
2025-01-30 12:58:14 -08:00
parent 6db201f827
commit 0dfb284f67
37 changed files with 179 additions and 638 deletions

View File

@@ -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)!