From 7bd19658f48e783a9909836d5409af457111f235 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 27 Dec 2023 10:58:04 +0800 Subject: [PATCH] Colors for toolbar items --- .../AudioPlayer/ExpandedAudioPlayer.swift | 6 +-- .../Sources/Views/Colors/Colors.swift | 2 + .../Contents.json | 38 +++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 apple/OmnivoreKit/Sources/Views/Colors/ThemeColors.xcassets/toolbarItemForeground.colorset/Contents.json diff --git a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedAudioPlayer.swift b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedAudioPlayer.swift index cf58b7558..51b7de10e 100644 --- a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedAudioPlayer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedAudioPlayer.swift @@ -94,7 +94,7 @@ label: { Image .toolbarTrash - .foregroundColor(ThemeManager.currentTheme.toolbarColor) + .foregroundColor(Color.toolbarItemForeground) } ).padding(.trailing, 5) @@ -105,11 +105,11 @@ if audioController.itemAudioProperties?.isArchived ?? false { Image .toolbarUnarchive - .foregroundColor(ThemeManager.currentTheme.toolbarColor) + .foregroundColor(Color.toolbarItemForeground) } else { Image .toolbarArchive - .foregroundColor(ThemeManager.currentTheme.toolbarColor) + .foregroundColor(Color.toolbarItemForeground) } } ).padding(.trailing, 5) diff --git a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift index cd768e3a4..f0838ae25 100644 --- a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift +++ b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift @@ -36,6 +36,8 @@ public extension Color { static var themeLabelForeground: Color { Color("_labelForeground", bundle: .module) } static var themeLabelBackground: Color { Color("_labelBackground", bundle: .module) } + static var toolbarItemForeground: Color { Color("toolbarItemForeground", bundle: .module) } + static var themeAudioPlayerGray: Color { Color("_audioPlayerGray", bundle: .module) } static var themeGrayBg01: Color { Color("_themeGrayBg01", bundle: .module) } static var themeHighlightColor: Color { Color("_highlightColor", bundle: .module) } diff --git a/apple/OmnivoreKit/Sources/Views/Colors/ThemeColors.xcassets/toolbarItemForeground.colorset/Contents.json b/apple/OmnivoreKit/Sources/Views/Colors/ThemeColors.xcassets/toolbarItemForeground.colorset/Contents.json new file mode 100644 index 000000000..6b73004e9 --- /dev/null +++ b/apple/OmnivoreKit/Sources/Views/Colors/ThemeColors.xcassets/toolbarItemForeground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3C", + "green" : "0x3C", + "red" : "0x3C" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD9", + "green" : "0xD9", + "red" : "0xD9" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +}