commit 3453c4525e5dfe41c14714e255cf38b01c96fc34 parent c9ce431627a98702d0e874cf5011ac24098c7a02 Author: Marc Stibane <marc@taler.net> Date: Thu, 31 Jul 2025 17:50:55 +0200 accentColor Diffstat:
11 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift @@ -65,8 +65,7 @@ struct ActionsSheet: View { } Button(action: shopAction) { HStack { - let talerColor = WalletColors().talerColor - ButtonIconBadge(type: .payment, foreColor: talerColor, done: false) + ButtonIconBadge(type: .payment, foreColor: .accentColor, done: false) .talerFont(.title2) Spacer() Text(buttonTitle) diff --git a/TalerWallet1/Views/Actions/TwoRowButtons.swift b/TalerWallet1/Views/Actions/TwoRowButtons.swift @@ -34,8 +34,7 @@ struct TypeButton: View { let blue = debug ? Color.blue : Color.clear let orange = debug ? Color.orange : Color.clear #endif - let talerColor = WalletColors().talerColor - let badge = ButtonIconBadge(type: type, foreColor: talerColor, done: false) + let badge = ButtonIconBadge(type: type, foreColor: .accentColor, done: false) .talerFont(.title2) let hLayout = HStack { badge diff --git a/TalerWallet1/Views/HelperViews/Buttons.swift b/TalerWallet1/Views/HelperViews/Buttons.swift @@ -118,7 +118,7 @@ struct QRButton : View { qrImage .resizable() .scaledToFit() - .foregroundStyle(WalletColors().talerColor) + .foregroundStyle(Color.accentColor) } else if minimalistic { let width = UIScreen.screenWidth / 7 qrText.talerFont(.largeTitle) @@ -147,7 +147,7 @@ struct PlusButton : View { Button(action: action) { Image(systemName: "plus") } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.title) .accessibilityLabel(accessibilityLabelStr) } @@ -160,7 +160,7 @@ struct BackButton : View { Button(action: action) { Image(ICONNAME_INCOMING + ICONNAME_FILL) } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.largeTitle) .accessibilityLabel(Text("Back", comment: "a11y")) } @@ -181,7 +181,7 @@ struct ForwardButton : View { : ICONNAME_OUTGOING Image(imageName) } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.largeTitle) .accessibilityLabel(Text("Continue", comment: "a11y")) } @@ -194,7 +194,7 @@ struct ArrowUpButton : View { Button(action: action) { Image(systemName: "arrow.up.to.line") } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.title2) .accessibilityLabel(Text("Scroll up", comment: "a11y")) } @@ -207,7 +207,7 @@ struct ArrowDownButton : View { Button(action: action) { Image(systemName: "arrow.down.to.line") } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.title2) .accessibilityLabel(Text("Scroll down", comment: "a11y")) } @@ -221,7 +221,7 @@ struct ReloadButton : View { Button(action: action) { Image(systemName: "arrow.clockwise") } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.title) .accessibilityLabel(Text("Reload", comment: "a11y")) .disabled(disabled) diff --git a/TalerWallet1/Views/HelperViews/CopyShare.swift b/TalerWallet1/Views/HelperViews/CopyShare.swift @@ -55,7 +55,7 @@ struct CopyButton: View { } } } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.body) .disabled(!isEnabled) } @@ -93,7 +93,7 @@ struct ShareButton: View { Text(title) } } - .tint(WalletColors().talerColor) + .tint(.accentColor) .talerFont(.body) .disabled(!isEnabled) } diff --git a/TalerWallet1/Views/HelperViews/TabBarView.swift b/TalerWallet1/Views/HelperViews/TabBarView.swift @@ -93,7 +93,7 @@ struct TabBarView: View { } } }.id(tab) - .foregroundColor(selection == tab ? WalletColors().talerColor : .secondary) + .foregroundColor(selection == tab ? .accentColor : .secondary) .padding(.vertical, 8) .accessibilityElement(children: .combine) .accessibility(label: Text(tab.title)) diff --git a/TalerWallet1/Views/HelperViews/TransactionButton.swift b/TalerWallet1/Views/HelperViews/TransactionButton.swift @@ -39,7 +39,7 @@ struct WarningButton: View { } .frame(maxWidth: .infinity) .foregroundColor(role == .destructive ? WalletColors().errorColor - : WalletColors().talerColor) + : .accentColor) } .talerFont(.title1) .buttonStyle(.bordered) diff --git a/TalerWallet1/Views/OIM/OIMactionButtons.swift b/TalerWallet1/Views/OIM/OIMactionButtons.swift @@ -36,7 +36,7 @@ struct OIMactionButton: View { Image(imageName) .resizable() .scaledToFit() - .foregroundStyle(WalletColors().talerColor) + .foregroundStyle(Color.accentColor) } .tagStyle(isFinal ? .bordered : .borderless) .opacity(disabled ? INVISIBLE : 1) @@ -55,7 +55,7 @@ struct OIMrequestButton: View { .resizable() .scaledToFit() // .tint(WalletColors().talerColor) - .foregroundStyle(WalletColors().talerColor) + .foregroundStyle(Color.accentColor) } .tagStyle(.bordered) .opacity(enabled ? 1 : INVISIBLE) diff --git a/TalerWallet1/Views/OIM/OIMbackground.swift b/TalerWallet1/Views/OIM/OIMbackground.swift @@ -17,15 +17,15 @@ struct OIMamountV: View { let currencyName: String let factor: Int // workaround because TEST has no large denominations, so we multiply with 100 - @State private var color = WalletColors().talerColor + @State private var color = Color.accentColor func updateColor() { #if DEBUG color = debugAnimations ? .orange - : fastAnimations ? WalletColors().talerColor + : fastAnimations ? .accentColor : .red #else - color = fastAnimations ? WalletColors().talerColor + color = fastAnimations ? .accentColor : WalletColors().confirm #endif } diff --git a/TalerWallet1/Views/Settings/SettingsItem.swift b/TalerWallet1/Views/Settings/SettingsItem.swift @@ -34,7 +34,7 @@ struct SettingsItem<Content: View>: View { HStack { VStack { let isWeb = id1?.hasPrefix("web") ?? false - let foreColor = isWeb ? WalletColors().talerColor + let foreColor = isWeb ? Color.accentColor : .primary HStack(spacing: 8.0) { if let imageName { diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift b/TalerWallet1/Views/Transactions/TransactionRowView.swift @@ -118,7 +118,7 @@ struct TransactionRowView: View { : done ? WalletColors().transactionColor(incoming) : WalletColors().uncompletedColor let for2Color = refreshZero ? textColor - : (pending || done) ? (incoming ? WalletColors().talerColor : textColor) + : (pending || done) ? (incoming ? .accentColor : textColor) : WalletColors().uncompletedColor let iconBadge = TransactionIconBadge(type: common.type, foreColor: foreColor, diff --git a/TalerWallet16.xcodeproj/project.pbxproj b/TalerWallet16.xcodeproj/project.pbxproj @@ -668,6 +668,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon2; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Taler; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "$(TARGET_NAME).entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; @@ -710,7 +711,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon2; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Taler; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "$(TARGET_NAME).entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; @@ -753,6 +754,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon3; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Taler; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "$(TARGET_NAME).entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; @@ -795,7 +797,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon3; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Taler; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "$(TARGET_NAME).entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; @@ -962,6 +964,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Taler; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "$(TARGET_NAME).entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; @@ -1004,7 +1007,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Taler; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "$(TARGET_NAME).entitlements"; CODE_SIGN_IDENTITY = "Apple Development";