gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]