commit eb7be740a36bd165430a429cf865eb9190da5ad2 parent ce65839083b78c806a1a62b6a38192746abb968b Author: Marc Stibane <marc@taler.net> Date: Wed, 24 Jun 2026 08:08:13 +0200 talerColor instead of accent Diffstat:
11 files changed, 32 insertions(+), 29 deletions(-)
diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift @@ -32,8 +32,9 @@ struct ScannedURLs: View { Button(action: action) { HStack { Text(scannedURL.command.localizedCommand) + let talerColor = WalletColors().talerColor ButtonIconBadge(type: scannedURL.command.transactionType, - foreColor: .accentColor, done: false) + foreColor: talerColor, done: false) .talerFont(.title2) Spacer() diff --git a/TalerWallet1/Views/Actions/TwoRowButtons.swift b/TalerWallet1/Views/Actions/TwoRowButtons.swift @@ -35,8 +35,9 @@ struct TypeButton: View { let orange = debug ? Color.orange : Color.clear #endif let disabledColor = WalletColors().gray2 + let talerColor = WalletColors().talerColor let badge = ButtonIconBadge(type: type, - foreColor: disabled ? disabledColor : .accentColor, + foreColor: disabled ? disabledColor : talerColor, done: false) .talerFont(.title2) let hLayout = HStack { 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(Color.accentColor) + .foregroundStyle(WalletColors().talerColor) } else if minimalistic { let width = UIScreen.screenWidth / 7 qrText.talerFont(.largeTitle) @@ -148,12 +148,12 @@ struct DoneButton : View { Button(action: action) { if let titleStr { Text(titleStr) - .tint(.accentColor) +// .tint(WalletColors().talerColor) } else { Image(systemName: CHECKMARK) // } } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title) .accessibilityLabel(accessibilityLabelStr) } @@ -167,7 +167,7 @@ struct PlusButton : View { Button(action: action) { Image(systemName: PLUS) } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title) .accessibilityLabel(accessibilityLabelStr) } @@ -181,7 +181,7 @@ struct SettingsButton : View { let button = Button(action: action) { Image(systemName: SETTINGS) } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title) .accessibilityLabel(accessibilityLabelStr) // if #available(iOS 26.0, *) { @@ -198,7 +198,7 @@ struct PasteButton : View { let button = Button(action: action) { Image(systemName: PASTE) } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title) .accessibilityLabel(accessibilityLabelStr) // if #available(iOS 26.0, *) { @@ -216,7 +216,7 @@ struct ZoomInButton : View { Button(action: action) { Image(ICONNAME_ZOOM_IN, SYSTEM_ZOOM_IN) } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title) .accessibilityLabel(accessibilityLabelStr) } @@ -230,7 +230,7 @@ struct ZoomOutButton : View { Button(action: action) { Image(ICONNAME_ZOOM_OUT, SYSTEM_ZOOM_OUT) } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title) .accessibilityLabel(accessibilityLabelStr) } @@ -245,7 +245,7 @@ struct BackButton : View { let sysName = SYSTEM_INCOMING4 + ICONNAME_FILL Image(name, sysName, fallback: FALLBACK_INCOMING) } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.largeTitle) .accessibilityLabel(Text("Back", comment: "a11y")) } @@ -268,7 +268,7 @@ struct ForwardButton : View { : SYSTEM_OUTGOING4 Image(imageName, sysName, fallback: FALLBACK_OUTGOING) } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.largeTitle) .accessibilityLabel(Text("Continue", comment: "a11y")) } @@ -281,7 +281,7 @@ struct ArrowUpButton : View { Button(action: action) { Image(systemName: ARROW_TOP) // } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title2) .accessibilityLabel(Text("Scroll up", comment: "a11y")) } @@ -294,7 +294,7 @@ struct ArrowDownButton : View { Button(action: action) { Image(systemName: ARROW_BOT) // } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title2) .accessibilityLabel(Text("Scroll down", comment: "a11y")) } @@ -308,7 +308,7 @@ struct ReloadButton : View { Button(action: action) { Image(systemName: RELOAD) // } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.title) .accessibilityLabel(Text("Reload", comment: "a11y")) .disabled(disabled) diff --git a/TalerWallet1/Views/HelperViews/CopyShare.swift b/TalerWallet1/Views/HelperViews/CopyShare.swift @@ -142,7 +142,7 @@ struct CopyButton: View { } } } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.body) .scaleEffect(scale) .disabled(!isEnabled) @@ -218,7 +218,7 @@ struct ShareButton: View { Text(title) } } - .tint(.accentColor) + .tint(WalletColors().talerColor) .talerFont(.body) .scaleEffect(scale) .disabled(!isEnabled) diff --git a/TalerWallet1/Views/HelperViews/GradientBorder.swift b/TalerWallet1/Views/HelperViews/GradientBorder.swift @@ -82,7 +82,7 @@ struct BorderWithHCE<Content: View>: View { } // let screenWidth = UIScreen.screenWidth GradientBorder(size: size + 20.0, - color: .accentColor, + color: WalletColors().talerColor, background: WalletColors().backgroundColor) { content() @@ -193,8 +193,8 @@ struct BorderWithNFC<Content: View>: View { } // let screenWidth = UIScreen.screenWidth GradientBorder(size: size + 20.0, - color: .accentColor, - background: WalletColors().backgroundColor) + color: WalletColors().talerColor, + background: WalletColors().backgroundColor) { content() .onTapGesture(count: 1) { nfcWriter.write(totpData) } diff --git a/TalerWallet1/Views/HelperViews/TabBarView.swift b/TalerWallet1/Views/HelperViews/TabBarView.swift @@ -105,7 +105,7 @@ struct ActionItem: View { .talerFont(.body) } } .id(tab) -// .foregroundColor(isActive ? .accentColor : .secondary) +// .foregroundColor(isActive ? WalletColors().talerColor : .secondary) .padding(.vertical, 4) .accessibilityElement(children: .combine) .accessibility(label: Text(tab.title)) @@ -175,7 +175,7 @@ struct TabBarView: View { } } } .id(tab) - .foregroundColor(isActive ? .accentColor : .secondary) + .foregroundColor(isActive ? WalletColors().talerColor : .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 - : .accentColor) + : WalletColors().talerColor) } .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(Color.accentColor) + .foregroundStyle(WalletColors().talerColor) } .tagStyle(isFinal ? .bordered : .borderless) .opacity(disabled ? INVISIBLE : 1) diff --git a/TalerWallet1/Views/OIM/OIMbackground.swift b/TalerWallet1/Views/OIM/OIMbackground.swift @@ -18,7 +18,7 @@ struct OIMamountV: View { let factor: Int // workaround because TEST has no large denominations, so we multiply with 100 let mayChangeSpeed: Bool - @State private var color = Color.accentColor + @State private var color = WalletColors().talerColor init(amount: Amount?, currencyName: String, factor: Int, mayChangeSpeed: Bool = true) { self.amount = amount @@ -30,10 +30,10 @@ struct OIMamountV: View { func updateColor() { #if DEBUG color = debugAnimations ? .orange - : fastAnimations ? .accentColor + : fastAnimations ? WalletColors().talerColor : .red #else - color = fastAnimations ? .accentColor + color = fastAnimations ? WalletColors().talerColor : WalletColors().confirm #endif } diff --git a/TalerWallet1/Views/Settings/SettingsItem.swift b/TalerWallet1/Views/Settings/SettingsItem.swift @@ -76,7 +76,7 @@ struct SettingsBase<Content: View>: View { var body: some View { let isWeb = id1?.hasPrefix("web") ?? false - let foreColor = isWeb ? Color.accentColor + let foreColor = isWeb ? WalletColors().talerColor : .primary VStack { content() diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift b/TalerWallet1/Views/Transactions/TransactionRowView.swift @@ -121,8 +121,9 @@ struct TransactionRowView: View { : WalletColors().uncompletedColor } func for2Color(_ textColor: Color) -> Color { + let talerColor = WalletColors().talerColor return refreshZero ? textColor - : doneOrPending ? (incoming ? .accentColor : textColor) + : doneOrPending ? (incoming ? talerColor : textColor) : WalletColors().uncompletedColor } func iconBadge(_ foreColor: Color) -> TransactionIconBadge {