diff --git a/MiniScanner/Core/Extensions/View/View+CustomColor.swift b/MiniScanner/Core/Extensions/View/View+CustomColor.swift index 75ea55e4b7f58648add231b866875fc930c065a0..e150f7b5b22e16844f2a636aa73bcb206c9b07d7 100644 --- a/MiniScanner/Core/Extensions/View/View+CustomColor.swift +++ b/MiniScanner/Core/Extensions/View/View+CustomColor.swift @@ -10,7 +10,7 @@ import SwiftUI struct CustomColorModifier: ViewModifier { - var color: Color + var color: ColorStyle var place: ColorPlace func body(content: Content) -> some View { @@ -19,23 +19,23 @@ struct CustomColorModifier: ViewModifier { case .background: content - .background(color) + .background(color.color) case .foreground: content - .foregroundStyle(color) + .foregroundStyle(color.color) } } } extension View { - func customForeground(_ color: Color) -> some View { + func customForeground(_ color: ColorStyle) -> some View { ModifiedContent(content: self, modifier: CustomColorModifier(color: color, place: .foreground)) } - func customBackground(_ color: Color) -> some View { + func customBackground(_ color: ColorStyle) -> some View { ModifiedContent(content: self, modifier: CustomColorModifier(color: color, place: .background)) } } diff --git a/MiniScanner/Core/Presentation/Controls/CustomMenuPicker.swift b/MiniScanner/Core/Presentation/Controls/CustomMenuPicker.swift index cb8c8f944652f0ab7cbd898297a855a5f0c15897..29d1e74a1c39eb320643b8495188b31b4e7d2fc2 100644 --- a/MiniScanner/Core/Presentation/Controls/CustomMenuPicker.swift +++ b/MiniScanner/Core/Presentation/Controls/CustomMenuPicker.swift @@ -22,6 +22,7 @@ struct CustomMenuPicker<Item: CustomMenuPickerItem, Label: View>: View { ForEach(items) { item in Text(item.displayedName) + .customForeground(.gray600) .tag(item) } } diff --git a/MiniScanner/Core/Presentation/Controls/CustomPicker.swift b/MiniScanner/Core/Presentation/Controls/CustomPicker.swift index 433fee4662da77b5d7616b53a5d7015e3f01343b..9003592880248acf0088b7c23bf0e42764c3cdb0 100644 --- a/MiniScanner/Core/Presentation/Controls/CustomPicker.swift +++ b/MiniScanner/Core/Presentation/Controls/CustomPicker.swift @@ -31,7 +31,7 @@ struct CustomPicker<Item: CustomMenuPickerItem>: View { HStack { Text(item.displayedName) - .customForeground(.mainText) + .customForeground(.gray600) Spacer() @@ -41,7 +41,7 @@ struct CustomPicker<Item: CustomMenuPickerItem>: View { .resizable() .aspectRatio(contentMode: .fit) .frame(width: 12, height: 12) - .customForeground(.mainBlue) + .customForeground(.primary) } } .frame(maxWidth: .infinity) diff --git a/MiniScanner/Core/Presentation/Controls/PrimaryButton.swift b/MiniScanner/Core/Presentation/Controls/PrimaryButton.swift index 9e1a8796722ba0e6f761934841dbb2213ebf626a..d34ef9fb189efa5c736af300d0a0a42e68163707 100644 --- a/MiniScanner/Core/Presentation/Controls/PrimaryButton.swift +++ b/MiniScanner/Core/Presentation/Controls/PrimaryButton.swift @@ -26,13 +26,13 @@ struct PrimaryButton: View { .frame(height: 54) .frame(maxWidth: .infinity) }) - .customBackground(.buttonsBlue) + .customBackground(.primary) .customCornerRadius(12) } private var titleView: some View { Text(title) - .customForeground(.mainText) + .customForeground(.gray0) } } diff --git a/MiniScanner/Features/Common/Presentation/MainView.swift b/MiniScanner/Features/Common/Presentation/MainView.swift index 15b89890cdb71d8c74c07181b6be78e2247efdfb..ff040458d3145ef81314bad029dbecb863e0f26c 100644 --- a/MiniScanner/Features/Common/Presentation/MainView.swift +++ b/MiniScanner/Features/Common/Presentation/MainView.swift @@ -24,7 +24,7 @@ struct MainView<ViewModel: MainViewModel, Content: View>: View { content() .frame(maxWidth: .infinity, maxHeight: .infinity) - .background(Color.mainBackground) + .customBackground(.base) .onAppear { viewModel.onAppear() } diff --git a/MiniScanner/Features/Settings/Presentation/SettingButton.swift b/MiniScanner/Features/Settings/Presentation/SettingButton.swift index ae10da92ceb4dcdf793eb0a84973ff6f162c4680..d69260737090c58570f1bacb5cabddca78ab1a23 100644 --- a/MiniScanner/Features/Settings/Presentation/SettingButton.swift +++ b/MiniScanner/Features/Settings/Presentation/SettingButton.swift @@ -45,16 +45,17 @@ struct SettingButton: View { .resizable() .aspectRatio(contentMode: .fit) .frame(width: 20, height: 20) + .customForeground(.gray600) } private var titleView: some View { Text(title) - .customForeground(.mainText) + .customForeground(.gray600) } private var valueView: some View { Text(value) - .customForeground(.mainText) + .customForeground(.gray350) } private var changeButton: some View { @@ -63,7 +64,7 @@ struct SettingButton: View { }, label: { Text(String.change.localized) - .customForeground(.mainText) + .customForeground(.gray600) }) } } diff --git a/MiniScanner/Features/Settings/Presentation/SettingSheetView.swift b/MiniScanner/Features/Settings/Presentation/SettingSheetView.swift index 28dc36f81f7b3d2313875a8a75d1b4eefb4f9da8..0ba8a212cf8c89dd6e74a94645614af6143cec79 100644 --- a/MiniScanner/Features/Settings/Presentation/SettingSheetView.swift +++ b/MiniScanner/Features/Settings/Presentation/SettingSheetView.swift @@ -39,7 +39,7 @@ extension SettingSheetView { private var titleView: some View { Text(title) - .customForeground(.mainText) + .customForeground(.gray600) } private var picker: some View {