[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 152/204: fix badge
From: |
gnunet |
Subject: |
[taler-taler-ios] 152/204: fix badge |
Date: |
Thu, 05 Dec 2024 23:52:00 +0100 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit 3c704b6642e21ca3f47843f9f55f2f730c916505
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Nov 21 21:55:40 2024 +0100
fix badge
---
TalerWallet1/Helper/Font+Taler.swift | 1 +
TalerWallet1/Views/HelperViews/IconBadge.swift | 21 ++++++++++-----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/TalerWallet1/Helper/Font+Taler.swift
b/TalerWallet1/Helper/Font+Taler.swift
index c307778..7650a75 100644
--- a/TalerWallet1/Helper/Font+Taler.swift
+++ b/TalerWallet1/Helper/Font+Taler.swift
@@ -181,6 +181,7 @@ extension TalerFont { // old running
static var subheadline: TalerFont { TalerFont(fontName, size: 15,
relativeTo: .subheadline) } // 15 -> 17
static var footnote: TalerFont { TalerFont(fontName, size: 13,
relativeTo: .footnote) } // 13 -> 15
static var caption: TalerFont { TalerFont(fontName, size: 12,
relativeTo: .caption) } // 12 -> 13
+ static var badge: TalerFont { TalerFont(fontName, size: 10,
relativeTo: .caption) } // 12 -> 13
}
struct StyleSizeBoldViewModifier: ViewModifier {
diff --git a/TalerWallet1/Views/HelperViews/IconBadge.swift
b/TalerWallet1/Views/HelperViews/IconBadge.swift
index 1627f5a..3077c1c 100644
--- a/TalerWallet1/Views/HelperViews/IconBadge.swift
+++ b/TalerWallet1/Views/HelperViews/IconBadge.swift
@@ -72,7 +72,7 @@ struct IconBadge: View {
let wideIcon: Image? // cheating: ZStack with widest icon to ensure
all have the same width
// TODO: EqualIconWidth...
- @ScaledMetric var spacing = 8 // relative to fontSize
+ @ScaledMetric var spacing = 6 // relative to fontSize
var body: some View {
HStack(alignment: .top, spacing: -spacing) {
@@ -82,16 +82,15 @@ struct IconBadge: View {
}
image.foregroundColor(foreColor)
}.talerFont(.title2)
- if wideIcon == nil {
- // ZStack centers the main icon, so the badge will always be
at the same position
- let badgeName = needsKYC ? NEEDS_KYC
- : CONFIRM_BANK
- Image(systemName: badgeName)
- .talerFont(.caption)
- .foregroundColor(needsKYC ? WalletColors().attention
- : shouldConfirm ? WalletColors().confirm
- : .clear)
- }
+ // ZStack centers the main icon, so the badge will always be at
the same position
+ let badgeName = needsKYC ? NEEDS_KYC
+ : CONFIRM_BANK
+ Image(systemName: badgeName)
+ .talerFont(.badge)
+ .foregroundColor(needsKYC ? WalletColors().attention
+ : shouldConfirm ? WalletColors().confirm
+ : .clear)
+ .padding(.top, -2)
}.accessibilityHidden(true)
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 191/204: layout, legal hint, (continued)
- [taler-taler-ios] 191/204: layout, legal hint, gnunet, 2024/12/05
- [taler-taler-ios] 194/204: A11y, gnunet, 2024/12/05
- [taler-taler-ios] 136/204: Available for transfer, gnunet, 2024/12/05
- [taler-taler-ios] 192/204: layout, gnunet, 2024/12/05
- [taler-taler-ios] 196/204: Nav header, gnunet, 2024/12/05
- [taler-taler-ios] 189/204: AccountPicker, gnunet, 2024/12/05
- [taler-taler-ios] 142/204: DepositAmountView, gnunet, 2024/12/05
- [taler-taler-ios] 153/204: products, gnunet, 2024/12/05
- [taler-taler-ios] 161/204: DepositWireTypesForCurrency, gnunet, 2024/12/05
- [taler-taler-ios] 150/204: layout improvement, gnunet, 2024/12/05
- [taler-taler-ios] 152/204: fix badge,
gnunet <=
- [taler-taler-ios] 157/204: fix flicker, gnunet, 2024/12/05
- [taler-taler-ios] 198/204: BankEditView, gnunet, 2024/12/05
- [taler-taler-ios] 164/204: amountLabel, gnunet, 2024/12/05
- [taler-taler-ios] 171/204: translations for GNU Taler, gnunet, 2024/12/05
- [taler-taler-ios] 175/204: layout, gnunet, 2024/12/05
- [taler-taler-ios] 177/204: common.scopes.first, gnunet, 2024/12/05
- [taler-taler-ios] 183/204: Section header, gnunet, 2024/12/05
- [taler-taler-ios] 193/204: Sound, gnunet, 2024/12/05
- [taler-taler-ios] 195/204: DepositWireTypes, gnunet, 2024/12/05
- [taler-taler-ios] 167/204: badge + a11y, gnunet, 2024/12/05