[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.
- [taler-taler-ios] branch master updated (e921612 -> 16eefa4), gnunet, 2024/09/29
- [taler-taler-ios] 03/12: fixedInnerHeight, gnunet, 2024/09/29
- [taler-taler-ios] 02/12: currencyInput,
gnunet <=
- [taler-taler-ios] 09/12: filterByState, gnunet, 2024/09/29
- [taler-taler-ios] 01/12: getMaxDepositAmount, getMaxPeerPushDebitAmount, gnunet, 2024/09/29
- [taler-taler-ios] 04/12: cleanup, gnunet, 2024/09/29
- [taler-taler-ios] 06/12: GetMaxPeerPushAmount, gnunet, 2024/09/29
- [taler-taler-ios] 12/12: German localization, gnunet, 2024/09/29
- [taler-taler-ios] 11/12: delete rows (swipeActions), gnunet, 2024/09/29
- [taler-taler-ios] 05/12: dismiss after delete, gnunet, 2024/09/29
- [taler-taler-ios] 07/12: don't beep twice for expirations, gnunet, 2024/09/29
- [taler-taler-ios] 08/12: strikethrough, gnunet, 2024/09/29
- [taler-taler-ios] 10/12: cleanup, gnunet, 2024/09/29