commit 4f8feaecca9b7d392c86e28f78f6eaf8176bc4f0
parent ea786e1c22031b4085a76e066291342f6cc241ed
Author: Marc Stibane <marc@taler.net>
Date: Sun, 5 Jul 2026 18:11:03 +0200
primaryAccent
Diffstat:
16 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/TalerWallet1/Helper/WalletColors.swift b/TalerWallet1/Helper/WalletColors.swift
@@ -74,7 +74,7 @@ public struct WalletColors {
contrast: ColorSchemeContrast,
prominent: Bool = false) -> Color {
disabled ? gray2
- : !prominent ? talerColor
+ : !prominent ? primaryAccent
: scheme == .dark ? primary(contrast)
: pressed ? gray6 : Color.white
}
@@ -83,7 +83,7 @@ public struct WalletColors {
disabled: Bool,
prominent: Bool = false) -> Color {
disabled ? gray7
- : prominent ? talerColor
+ : prominent ? primaryAccent
: pressed ? gray4 : gray5
}
@@ -142,17 +142,17 @@ public struct WalletColors {
Color("Error")
}
- var talerColor: Color {
+ var primaryAccent: Color {
Color("Taler")
}
func pendingColor(_ incoming: Bool) -> Color {
- incoming ? talerColor // Color("PendingIncoming")
- : primary() // Color("PendingOutgoing")
+ incoming ? primaryAccent // Color("PendingIncoming")
+ : primary() // Color("PendingOutgoing")
}
func transactionColor(_ incoming: Bool) -> Color {
- incoming ? talerColor // Color("Incoming")
- : primary() // Color("Outgoing")
+ incoming ? primaryAccent // Color("Incoming")
+ : primary() // Color("Outgoing")
}
}
diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift
@@ -32,9 +32,9 @@ struct ScannedURLs: View {
Button(action: action) {
HStack {
Text(scannedURL.command.localizedCommand)
- let talerColor = WalletColors().talerColor
+ let primaryAccent = WalletColors().primaryAccent
ButtonIconBadge(type: scannedURL.command.transactionType,
- foreColor: talerColor, done: false)
+ foreColor: primaryAccent, done: false)
.talerFont(.title2)
Spacer()
diff --git a/TalerWallet1/Views/Actions/TwoRowButtons.swift b/TalerWallet1/Views/Actions/TwoRowButtons.swift
@@ -35,9 +35,9 @@ struct TypeButton: View {
let orange = debug ? Color.orange : Color.clear
#endif
let disabledColor = WalletColors().gray2
- let talerColor = WalletColors().talerColor
+ let primaryAccent = WalletColors().primaryAccent
let badge = ButtonIconBadge(type: type,
- foreColor: disabled ? disabledColor : talerColor,
+ foreColor: disabled ? disabledColor : primaryAccent,
done: false)
.talerFont(.title2)
let hLayout = HStack {
diff --git a/TalerWallet1/Views/Balances/DiscountPasses.swift b/TalerWallet1/Views/Balances/DiscountPasses.swift
@@ -56,7 +56,7 @@ struct DiscountsPassesItem: View {
let isExpired = token.validityEnd < .now()
let primary = WalletColors().primary(colorSchemeContrast)
let secondary = WalletColors().secondary(colorScheme, colorSchemeContrast)
- let talerColor = WalletColors().talerColor
+ let primaryAccent = WalletColors().primaryAccent
let name = Text(token.name)
.talerFont(.title)
@@ -78,12 +78,12 @@ struct DiscountsPassesItem: View {
if let available = token.tokensAvailable {
// Discount
Text("x\(available)")
- .foregroundColor(talerColor)
+ .foregroundColor(primaryAccent)
} else {
// Pass
if isValid {
Text("active")
- .foregroundColor(talerColor)
+ .foregroundColor(primaryAccent)
}
}
}
@@ -113,7 +113,7 @@ struct DiscountsPassesItem: View {
.accessibilityLabel(dateStrings.1)
.talerFont(.body)
}.frame(maxWidth: .infinity)
- .background(talerColor.opacity(isValid ? 0.1 : 0))
+ .background(primaryAccent.opacity(isValid ? 0.1 : 0))
.onTapGesture {
if !isExpired {
dateToggled.toggle()
@@ -219,7 +219,7 @@ struct DiscountPassesSection: View {
var body: some View {
let discText = String(localized: "Discounts")
let passText = String(localized: "Passes")
- let activeColor = WalletColors().talerColor
+ let activeColor = WalletColors().primaryAccent
let inactiveColor = WalletColors().secondary(colorScheme, colorSchemeContrast)
Section {
let discCount = controller.discounts.count
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(WalletColors().primaryAccent)
} 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(WalletColors().talerColor)
+// .tint(WalletColors().primaryAccent)
} else {
Image(systemName: CHECKMARK) //
}
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title)
.accessibilityLabel(accessibilityLabelStr)
}
@@ -167,7 +167,7 @@ struct PlusButton : View {
Button(action: action) {
Image(systemName: PLUS)
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title)
.accessibilityLabel(accessibilityLabelStr)
}
@@ -199,7 +199,7 @@ struct SettingsButton : View {
let button = Button(action: action) {
Image(systemName: SETTINGS)
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title)
.accessibilityLabel(accessibilityLabelStr)
// if #available(iOS 26.0, *) {
@@ -216,7 +216,7 @@ struct PasteButton : View {
let button = Button(action: action) {
Image(systemName: PASTE)
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title)
.accessibilityLabel(accessibilityLabelStr)
// if #available(iOS 26.0, *) {
@@ -234,7 +234,7 @@ struct ZoomInButton : View {
Button(action: action) {
Image(ICONNAME_ZOOM_IN, SYSTEM_ZOOM_IN)
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title)
.accessibilityLabel(accessibilityLabelStr)
}
@@ -248,7 +248,7 @@ struct ZoomOutButton : View {
Button(action: action) {
Image(ICONNAME_ZOOM_OUT, SYSTEM_ZOOM_OUT)
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title)
.accessibilityLabel(accessibilityLabelStr)
}
@@ -263,7 +263,7 @@ struct BackButton : View {
let sysName = SYSTEM_INCOMING4 + ICONNAME_FILL
Image(name, sysName, fallback: FALLBACK_INCOMING)
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.largeTitle)
.accessibilityLabel(Text("Back", comment: "a11y"))
}
@@ -286,7 +286,7 @@ struct ForwardButton : View {
: SYSTEM_OUTGOING4
Image(imageName, sysName, fallback: FALLBACK_OUTGOING)
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.largeTitle)
.accessibilityLabel(Text("Continue", comment: "a11y"))
}
@@ -299,7 +299,7 @@ struct ArrowUpButton : View {
Button(action: action) {
Image(systemName: ARROW_TOP) //
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title2)
.accessibilityLabel(Text("Scroll up", comment: "a11y"))
}
@@ -312,7 +312,7 @@ struct ArrowDownButton : View {
Button(action: action) {
Image(systemName: ARROW_BOT) //
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.title2)
.accessibilityLabel(Text("Scroll down", comment: "a11y"))
}
@@ -326,7 +326,7 @@ struct ReloadButton : View {
Button(action: action) {
Image(systemName: RELOAD) //
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.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(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.talerFont(.body)
.scaleEffect(scale)
.disabled(!isEnabled)
@@ -218,7 +218,7 @@ struct ShareButton: View {
Text(title)
}
}
- .tint(WalletColors().talerColor)
+ .tint(WalletColors().primaryAccent)
.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: WalletColors().talerColor,
+ color: WalletColors().primaryAccent,
background: WalletColors().backgroundColor)
{
content()
@@ -193,7 +193,7 @@ struct BorderWithNFC<Content: View>: View {
}
// let screenWidth = UIScreen.screenWidth
GradientBorder(size: size + 20.0,
- color: WalletColors().talerColor,
+ color: WalletColors().primaryAccent,
background: WalletColors().backgroundColor)
{
content()
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 ? WalletColors().talerColor : .secondary)
+// .foregroundColor(isActive ? WalletColors().primaryAccent : .secondary)
.padding(.vertical, 4)
.accessibilityElement(children: .combine)
.accessibility(label: Text(tab.title))
@@ -175,7 +175,7 @@ struct TabBarView: View {
}
}
} .id(tab)
- .foregroundColor(isActive ? WalletColors().talerColor : .secondary)
+ .foregroundColor(isActive ? WalletColors().primaryAccent : .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)
+ : WalletColors().primaryAccent)
}
.talerFont(.title1)
.buttonStyle(.bordered)
diff --git a/TalerWallet1/Views/OIM/ChartHistoryView.swift b/TalerWallet1/Views/OIM/ChartHistoryView.swift
@@ -121,7 +121,7 @@ struct ChartHistoryView: View {
let yVal = yTransform(item.balance)
LineMark(x: .value("x", xVal),
y: .value("y", yVal))
- .foregroundStyle(WalletColors().talerColor)
+ .foregroundStyle(WalletColors().primaryAccent)
.lineStyle(StrokeStyle(lineWidth: lineWidth, lineCap: .round, lineJoin: .round))
// 0 = uniform spline, 0.5 = centripetal spline, 1.0 = chordal spline
// See https://en.wikipedia.org/wiki/File:Catmull-Rom_examples_with_parameters..png
@@ -153,7 +153,7 @@ struct ChartHistoryView: View {
.resizable()
.scaledToFit()
.frame(width: 25)
- .foregroundStyle(WalletColors().talerColor)
+ .foregroundStyle(WalletColors().primaryAccent)
})
}
}
diff --git a/TalerWallet1/Views/OIM/HistoryDetailView.swift b/TalerWallet1/Views/OIM/HistoryDetailView.swift
@@ -97,7 +97,7 @@ struct HistoryDetailView: View {
withStroke: Color.primary,
lineWidth: 2,
fill: LinearGradient(
-// gradient: Gradient(colors: [WalletColors().talerColor, .white]),
+// gradient: Gradient(colors: [WalletColors().primaryAccent, .white]),
gradient: Gradient(colors: [WalletColors().transactionColor(incoming), .white]),
startPoint: .top,
endPoint: .bottom
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(WalletColors().primaryAccent)
}
.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 = WalletColors().talerColor
+ @State private var color = WalletColors().primaryAccent
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 ? WalletColors().talerColor
+ : fastAnimations ? WalletColors().primaryAccent
: .red
#else
- color = fastAnimations ? WalletColors().talerColor
+ color = fastAnimations ? WalletColors().primaryAccent
: 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 ? WalletColors().talerColor
+ let foreColor = isWeb ? WalletColors().primaryAccent
: .primary
VStack {
content()
diff --git a/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift b/TalerWallet1/Views/Sheets/Payment/ChoicesView.swift
@@ -18,7 +18,7 @@ struct ChoicesView: View, Sendable {
@ViewBuilder
func selectedBackground(_ useColor: Bool) -> some View {
let is26: Bool = if #available(iOS 26.0, *) { true } else { false }
- let color: Color = useColor ? WalletColors().talerColor
+ let color: Color = useColor ? WalletColors().primaryAccent
: .secondary
if #available(iOS 17.0, *) {
RoundedRectangle(cornerRadius: is26 ? 26 : 10)
diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift b/TalerWallet1/Views/Transactions/TransactionRowView.swift
@@ -121,9 +121,9 @@ struct TransactionRowView: View {
: WalletColors().uncompletedColor
}
func for2Color(_ textColor: Color) -> Color {
- let talerColor = WalletColors().talerColor
+ let primaryAccent = WalletColors().primaryAccent
return refreshZero ? textColor
- : doneOrPending ? (incoming ? talerColor : textColor)
+ : doneOrPending ? (incoming ? primaryAccent : textColor)
: WalletColors().uncompletedColor
}
func iconBadge(_ foreColor: Color) -> TransactionIconBadge {