gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 02/12: currencyInput


From: gnunet
Subject: [taler-taler-ios] 02/12: currencyInput
Date: Sun, 29 Sep 2024 10:14:18 +0200

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 b39155d738505582961cf14b30f0c5f526d413fd
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Sep 24 12:15:16 2024 +0200

    currencyInput
---
 TalerWallet1/Views/HelperViews/CurrencyField.swift   | 20 ++++++++++++--------
 .../Views/HelperViews/CurrencyInputView.swift        |  4 +++-
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/CurrencyField.swift 
b/TalerWallet1/Views/HelperViews/CurrencyField.swift
index 2278b4b..c3e9141 100644
--- a/TalerWallet1/Views/HelperViews/CurrencyField.swift
+++ b/TalerWallet1/Views/HelperViews/CurrencyField.swift
@@ -63,12 +63,16 @@ struct CurrencyField: View {
         ZStack {
             // Text view to display the formatted currency
             // Set as priority so CurrencyInputField size doesn't affect parent
-            Text(amount.formatted(currencyInfo, isNegative: false))
-                .layoutPriority(1)
-                // make the textfield use the whole width for tapping inside 
to become active
-                .frame(maxWidth: .infinity, alignment: .trailing)
-//                .background(.clear) this is not the problem of the white 
corners
-
+            let text = Text(amount.formatted(currencyInfo, isNegative: false))
+                        .layoutPriority(1)
+            // make the textfield use the whole width for tapping inside to 
become active
+                        .frame(maxWidth: .infinity, alignment: .trailing)
+                        .padding(4)
+            text
+                .background(WalletColors().fieldBackground)
+                .cornerRadius(10)
+                .overlay(RoundedRectangle(cornerRadius: 10)
+                        .stroke(WalletColors().fieldForeground, lineWidth: 1))
             // Input text field to handle UI
             currencyFieldRepresentable
 //                .accessibilityHidden(true)
@@ -126,14 +130,14 @@ struct CurrencyTextfieldRepresentable: 
UIViewRepresentable {
         textField.delegate = context.coordinator
 
         // Set keyboard type
-        textField.keyboardType = .numberPad
+        textField.keyboardType = .asciiCapableNumberPad //  numberPad
 
         // Make visual components invisible...
         textField.tintColor = .clear
         textField.textColor = .clear
         textField.backgroundColor = .clear
         // ... except for the bezel around the textfield
-        textField.borderStyle = .roundedRect
+        textField.borderStyle = .none   // .roundedRect
 //        textField.textFieldStyle(.roundedBorder)
 
 #if DEBUG
diff --git a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift 
b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift
index d31ac1c..39634b3 100644
--- a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift
+++ b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift
@@ -87,11 +87,12 @@ struct CurrencyInputView: View {
                 .frame(maxWidth: .infinity, alignment: .leading)
                 .talerFont(.title3)
                 .accessibilityHidden(true)
+                .padding(.bottom, -6)
             currencyField
                 .accessibilityLabel(title)
                 .frame(maxWidth: .infinity, alignment: .trailing)
                 .foregroundColor(WalletColors().fieldForeground)     // text 
color
-                .background(WalletColors().fieldBackground)
+//                .background(WalletColors().fieldBackground)       // 
problem: white corners
                 .talerFont(.title2)
                 .textFieldStyle(.roundedBorder)
                 .onTapGesture {
@@ -144,6 +145,7 @@ struct CurrencyInputView: View {
                         }
                     }
                 }
+                .padding(.top, 6)
             } // iOS 16+ only
         }.onAppear {   // make CurrencyField show the keyboard after 0.4 
seconds
             if hasBeenShown {

-- 
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]