diff --git a/Core/Core/View/Base/UnitButtonView.swift b/Core/Core/View/Base/UnitButtonView.swift index 37c94eeb4..b89106145 100644 --- a/Core/Core/View/Base/UnitButtonView.swift +++ b/Core/Core/View/Base/UnitButtonView.swift @@ -145,13 +145,16 @@ public struct UnitButtonView: View { case .continueLesson, .nextSection: HStack { Text(type.stringValue()) - .foregroundColor(Theme.Colors.styledButtonText) + .foregroundColor( + type == .continueLesson ? Theme.Colors.resumeButtonText : + Theme.Colors.styledButtonText + ) .padding(.leading, 20) .font(Theme.Fonts.labelLarge) CoreAssets.arrowLeft.swiftUIImage.renderingMode(.template) .foregroundColor( type == .continueLesson - ? Theme.Colors.accentColor + ? Theme.Colors.resumeButtonText : Theme.Colors.styledButtonText ) .rotationEffect(Angle.degrees(180)) @@ -184,7 +187,10 @@ public struct UnitButtonView: View { case .continueLesson, .nextSection, .reload, .finish, .custom: Theme.Shapes.buttonShape - .fill(bgColor ?? Theme.Colors.accentButtonColor) + .fill( + type == .continueLesson ? Theme.Colors.resumeButtonBG : + bgColor ?? Theme.Colors.accentButtonColor + ) .shadow(color: (type == .first || type == .next diff --git a/Theme/Theme/Assets.xcassets/Colors/ResumeButton/Contents.json b/Theme/Theme/Assets.xcassets/Colors/ResumeButton/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/Theme/Theme/Assets.xcassets/Colors/ResumeButton/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Theme/Theme/Assets.xcassets/Colors/ResumeButton/ResumeButtonBG.colorset/Contents.json b/Theme/Theme/Assets.xcassets/Colors/ResumeButton/ResumeButtonBG.colorset/Contents.json new file mode 100644 index 000000000..bf1a96417 --- /dev/null +++ b/Theme/Theme/Assets.xcassets/Colors/ResumeButton/ResumeButtonBG.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "0.408", + "red" : "0.235" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF8", + "green" : "0x78", + "red" : "0x53" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Theme/Theme/Assets.xcassets/Colors/ResumeButton/ResumeButtonText.colorset/Contents.json b/Theme/Theme/Assets.xcassets/Colors/ResumeButton/ResumeButtonText.colorset/Contents.json new file mode 100644 index 000000000..22c4bb0a8 --- /dev/null +++ b/Theme/Theme/Assets.xcassets/Colors/ResumeButton/ResumeButtonText.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 4073fb3e4..1b0d20ef6 100644 --- a/Theme/Theme/SwiftGen/ThemeAssets.swift +++ b/Theme/Theme/SwiftGen/ThemeAssets.swift @@ -60,6 +60,8 @@ public enum ThemeAssets { public static let progressDone = ColorAsset(name: "ProgressDone") public static let progressSkip = ColorAsset(name: "ProgressSkip") public static let selectedAndDone = ColorAsset(name: "SelectedAndDone") + public static let resumeButtonBG = ColorAsset(name: "ResumeButtonBG") + public static let resumeButtonText = ColorAsset(name: "ResumeButtonText") public static let secondaryButtonBGColor = ColorAsset(name: "SecondaryButtonBGColor") public static let secondaryButtonBorderColor = ColorAsset(name: "SecondaryButtonBorderColor") public static let secondaryButtonTextColor = ColorAsset(name: "SecondaryButtonTextColor") diff --git a/Theme/Theme/Theme.swift b/Theme/Theme/Theme.swift index 0c75fb554..359e2c8ef 100644 --- a/Theme/Theme/Theme.swift +++ b/Theme/Theme/Theme.swift @@ -80,6 +80,8 @@ public struct Theme: Sendable { nonisolated(unsafe) public private(set) static var primaryCardUpgradeBG = ThemeAssets.primaryCardCourseUpgradeBG.swiftUIColor nonisolated(unsafe) public private(set) static var primaryCardProgressBG = ThemeAssets.primaryCardProgressBG.swiftUIColor nonisolated(unsafe) public private(set) static var courseProgressBG = ThemeAssets.courseProgressBG.swiftUIColor + nonisolated(unsafe) public private(set) static var resumeButtonBG = ThemeAssets.resumeButtonBG.swiftUIColor + nonisolated(unsafe) public private(set) static var resumeButtonText = ThemeAssets.resumeButtonText.swiftUIColor public static func update( accentColor: Color = ThemeAssets.accentColor.swiftUIColor,