taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 2de0e221f55fdb5993bf6901898bd8f474eaff2e
parent 8cfc1c524b27ded7f11ef8cea48e7ce6e3f21fca
Author: Marc Stibane <marc@taler.net>
Date:   Tue, 13 Feb 2024 08:20:40 +0100

More contrast

Diffstat:
MTalerWallet1/Views/Balances/BalancesSectionView.swift | 9+++++++--
MTalerWallet1/Views/HelperViews/BarGraph.swift | 8+++++++-
2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/TalerWallet1/Views/Balances/BalancesSectionView.swift b/TalerWallet1/Views/Balances/BalancesSectionView.swift @@ -24,6 +24,8 @@ struct BalancesSectionView { @Binding var shouldReloadBalances: Int @EnvironmentObject private var model: WalletModel + @Environment(\.colorScheme) private var colorScheme + @Environment(\.colorSchemeContrast) private var colorSchemeContrast @EnvironmentObject private var controller: Controller @AppStorage("minimalistic") var minimalistic: Bool = false @@ -139,8 +141,11 @@ extension BalancesSectionView: View { let count = transactionCount > MAXRECENT ? MAXRECENT : transactionCount Text(count > 1 ? "Recent \(count) transactions" : "Recent transaction") - .talerFont(.callout) -// .foregroundColor(colorSchemeContrast == .increased ? .primary : .secondary) + .talerFont(.title3) + .foregroundColor(colorSchemeContrast == .increased ? .primary + : minimalistic ? .secondary + : colorScheme == .dark ? .secondary + : Color(.darkGray)) } } } // recent transactions diff --git a/TalerWallet1/Views/HelperViews/BarGraph.swift b/TalerWallet1/Views/HelperViews/BarGraph.swift @@ -15,7 +15,9 @@ struct BarGraphHeader: View { @Binding var shouldReloadBalances: Int @EnvironmentObject private var model: WalletModel + @Environment(\.colorScheme) private var colorScheme @Environment(\.colorSchemeContrast) private var colorSchemeContrast + @AppStorage("minimalistic") var minimalistic: Bool = false @State private var completedTransactions: [Transaction] = [] @ScaledMetric var barHeight = 9 // relative to fontSize @@ -24,12 +26,16 @@ struct BarGraphHeader: View { HStack (alignment: .center, spacing: 10) { Text(currencyName) .talerFont(.title2) -// .foregroundColor(colorSchemeContrast == .increased ? .primary : .secondary) + .foregroundColor(colorSchemeContrast == .increased ? .primary + : minimalistic ? .secondary + : colorScheme == .dark ? .secondary + : Color(.darkGray)) if let scopeInfo { BarGraph(transactions: $completedTransactions, maxBars: MAXBARS, barHeight: barHeight) } } +// .headerProminence(.increased) // unfortunately this is not useful .task(id: shouldReloadBalances + 2_000_000) { if let scopeInfo { symLog.log(".task for BarGraphHeader(\(scopeInfo.currency)) - reload Transactions")