From 102e44c2af2b4225de8c329ef39bbc82a5906f5b Mon Sep 17 00:00:00 2001 From: Saeed Bashir Date: Thu, 9 May 2024 10:40:34 +0500 Subject: [PATCH] chore: Sliding course menu theme enhancement --- .../ScrollSlidingTabBar.swift | 2 +- .../Contents.json | 38 +++++++++++++++++++ Theme/Theme/SwiftGen/ThemeAssets.swift | 1 + Theme/Theme/Theme.swift | 1 + 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Theme/Theme/Assets.xcassets/Colors/SlidingTabBar/slidingSelectedTextColor.colorset/Contents.json diff --git a/Core/Core/View/Base/ScrollSlidingTabBar/ScrollSlidingTabBar.swift b/Core/Core/View/Base/ScrollSlidingTabBar/ScrollSlidingTabBar.swift index 5f09777a7..bd558d197 100644 --- a/Core/Core/View/Base/ScrollSlidingTabBar/ScrollSlidingTabBar.swift +++ b/Core/Core/View/Base/ScrollSlidingTabBar/ScrollSlidingTabBar.swift @@ -100,7 +100,7 @@ extension ScrollSlidingTabBar { } .accentColor( isSelected(index: obj.offset) - ? Theme.Colors.white + ? Theme.Colors.slidingSelectedTextColor : Theme.Colors.slidingTextColor ) } diff --git a/Theme/Theme/Assets.xcassets/Colors/SlidingTabBar/slidingSelectedTextColor.colorset/Contents.json b/Theme/Theme/Assets.xcassets/Colors/SlidingTabBar/slidingSelectedTextColor.colorset/Contents.json new file mode 100644 index 000000000..22c4bb0a8 --- /dev/null +++ b/Theme/Theme/Assets.xcassets/Colors/SlidingTabBar/slidingSelectedTextColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Theme/Theme/SwiftGen/ThemeAssets.swift b/Theme/Theme/SwiftGen/ThemeAssets.swift index b2573c7f0..aa00c67f5 100644 --- a/Theme/Theme/SwiftGen/ThemeAssets.swift +++ b/Theme/Theme/SwiftGen/ThemeAssets.swift @@ -56,6 +56,7 @@ public enum ThemeAssets { public static let secondaryButtonBorderColor = ColorAsset(name: "SecondaryButtonBorderColor") public static let secondaryButtonTextColor = ColorAsset(name: "SecondaryButtonTextColor") public static let shadowColor = ColorAsset(name: "ShadowColor") + public static let slidingSelectedTextColor = ColorAsset(name: "slidingSelectedTextColor") public static let slidingStrokeColor = ColorAsset(name: "slidingStrokeColor") public static let slidingTextColor = ColorAsset(name: "slidingTextColor") public static let snackbarErrorColor = ColorAsset(name: "SnackbarErrorColor") diff --git a/Theme/Theme/Theme.swift b/Theme/Theme/Theme.swift index 0fad87eb9..c985b752b 100644 --- a/Theme/Theme/Theme.swift +++ b/Theme/Theme/Theme.swift @@ -65,6 +65,7 @@ public struct Theme { public private(set) static var infoColor = ThemeAssets.infoColor.swiftUIColor public private(set) static var irreversibleAlert = ThemeAssets.irreversibleAlert.swiftUIColor public private(set) static var slidingTextColor = ThemeAssets.slidingTextColor.swiftUIColor + public private(set) static var slidingSelectedTextColor = ThemeAssets.slidingSelectedTextColor.swiftUIColor public private(set) static var slidingStrokeColor = ThemeAssets.slidingStrokeColor.swiftUIColor public private(set) static var primaryHeaderColor = ThemeAssets.primaryHeaderColor.swiftUIColor public private(set) static var secondaryHeaderColor = ThemeAssets.secondaryHeaderColor.swiftUIColor