[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 05/30: ScrollVStack, cleanup
From: |
gnunet |
Subject: |
[taler-taler-ios] 05/30: ScrollVStack, cleanup |
Date: |
Sun, 19 Nov 2023 23:53:29 +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 f26e277802ecf62ad042cb485c4cfc981c773368
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Nov 17 16:37:06 2023 +0100
ScrollVStack, cleanup
---
TalerWallet1/Views/Peer2peer/RequestPayment.swift | 2 +-
TalerWallet1/Views/Peer2peer/RequestPurpose.swift | 4 +--
TalerWallet1/Views/Peer2peer/SendDoneV.swift | 4 +--
TalerWallet1/Views/Peer2peer/SendPurpose.swift | 40 +++++++++--------------
4 files changed, 21 insertions(+), 29 deletions(-)
diff --git a/TalerWallet1/Views/Peer2peer/RequestPayment.swift
b/TalerWallet1/Views/Peer2peer/RequestPayment.swift
index 18cc280..618ddee 100644
--- a/TalerWallet1/Views/Peer2peer/RequestPayment.swift
+++ b/TalerWallet1/Views/Peer2peer/RequestPayment.swift
@@ -57,7 +57,7 @@ struct RequestPayment: View {
.disabled(disabled)
}
Spacer()
- } }
+ } } // ScrollVStack
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
diff --git a/TalerWallet1/Views/Peer2peer/RequestPurpose.swift
b/TalerWallet1/Views/Peer2peer/RequestPurpose.swift
index 8562c52..60572d4 100644
--- a/TalerWallet1/Views/Peer2peer/RequestPurpose.swift
+++ b/TalerWallet1/Views/Peer2peer/RequestPurpose.swift
@@ -25,7 +25,7 @@ struct RequestPurpose: View {
var body: some View {
let currencyInfo = controller.info(for: amountToTransfer.currencyStr,
controller.currencyTicker)
- VStack (spacing: 6) {
+ ScrollView { VStack (spacing: 6) {
Text(amountToTransfer.string(currencyInfo))
Text("+ \(fee) payment fee")
.foregroundColor(.red)
@@ -76,7 +76,7 @@ struct RequestPurpose: View {
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal)
- }
+ } } // ScrollVStack
.navigationTitle(navTitle)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
.onAppear {
diff --git a/TalerWallet1/Views/Peer2peer/SendDoneV.swift
b/TalerWallet1/Views/Peer2peer/SendDoneV.swift
index d7fdd45..b52b4bc 100644
--- a/TalerWallet1/Views/Peer2peer/SendDoneV.swift
+++ b/TalerWallet1/Views/Peer2peer/SendDoneV.swift
@@ -36,7 +36,7 @@ struct SendDoneV: View {
let _ = Self._printChanges()
let _ = symLog.vlog() // just to get the # to compare it with
.onAppear & onDisappear
#endif
- VStack {
+ ScrollView { VStack {
if let transactionId {
TransactionDetailView(stack: stack.push(),
transactionId: transactionId,
@@ -53,7 +53,7 @@ struct SendDoneV: View {
} else {
WithdrawProgressView(message: "Loading...")
}
- }
+ } } // ScrollVStack
//
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
.navigationTitle(navTitle)
.task {
diff --git a/TalerWallet1/Views/Peer2peer/SendPurpose.swift
b/TalerWallet1/Views/Peer2peer/SendPurpose.swift
index a06f25b..6d7c619 100644
--- a/TalerWallet1/Views/Peer2peer/SendPurpose.swift
+++ b/TalerWallet1/Views/Peer2peer/SendPurpose.swift
@@ -22,7 +22,7 @@ struct SendPurpose: View {
@FocusState private var isFocused: Bool
var body: some View {
- VStack (spacing: 6) {
+ ScrollView { VStack (spacing: 6) {
Text(amountToTransfer.readableDescription) // TODO:
curreny formatter
Text("+ \(fee) payment fee")
.accessibilityFont(.body)
@@ -33,34 +33,26 @@ struct SendPurpose: View {
.accessibilityFont(.title2)
.padding(.top)
}
- if #available(iOS 16.0, *) {
+ Group { if #available(iOS 16.0, *) {
TextField("Subject", text: $summary, axis: .vertical)
- .accessibilityFont(.title2)
- .lineLimit(2...)
- .foregroundColor(WalletColors().fieldForeground)
// text color
- .background(WalletColors().fieldBackground)
- .textFieldStyle(.roundedBorder)
.focused($isFocused)
- .onAppear {
- DispatchQueue.main.asyncAfter(deadline: .now() +
0.4) {
- isFocused = true // make first
responder - raise keybord
- }
- }
+ .lineLimit(2...)
} else {
TextField("Subject", text: $summary)
- .accessibilityFont(.title)
-// .lineLimit(2...5) // lineLimit' is only available
in iOS 16.0 or newer
- .foregroundColor(WalletColors().fieldForeground)
// text color
- .background(WalletColors().fieldBackground)
- .textFieldStyle(.roundedBorder)
.focused($isFocused)
- .onAppear {
- DispatchQueue.main.asyncAfter(deadline: .now() +
0.4) {
- isFocused = true // make first
responder - raise keybord
- }
+// .lineLimit(2...5) // lineLimit' is only available in
iOS 16.0 or newer
+ } }
+ .accessibilityFont(.title2)
+ .foregroundColor(WalletColors().fieldForeground) //
text color
+ .background(WalletColors().fieldBackground)
+ .textFieldStyle(.roundedBorder)
+ .onAppear {
+ symLog.log("dispatching kbd...")
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) {
+ isFocused = true // make first responder -
raise keybord
+ symLog.log("...kbd isFocused")
}
- } // #available
-
+ }
HStack{
Spacer()
Text(verbatim: "\(summary.count)/100")
@@ -93,7 +85,7 @@ struct SendPurpose: View {
.textFieldStyle(.roundedBorder)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal)
- }
+ } } // ScrollVStack
.navigationTitle(navTitle)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
.onAppear {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (e79881c -> b01070b), gnunet, 2023/11/19
- [taler-taler-ios] 02/30: Use "nu" (instead of "te") for Null, gnunet, 2023/11/19
- [taler-taler-ios] 04/30: cleanup, debugging, gnunet, 2023/11/19
- [taler-taler-ios] 05/30: ScrollVStack, cleanup,
gnunet <=
- [taler-taler-ios] 01/30: Bugfix: Arithmetic error, gnunet, 2023/11/19
- [taler-taler-ios] 06/30: Notifications, gnunet, 2023/11/19
- [taler-taler-ios] 19/30: tabbed button strings, gnunet, 2023/11/19
- [taler-taler-ios] 18/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 07/30: KYC, gnunet, 2023/11/19
- [taler-taler-ios] 03/30: Dismiss keyboard, gnunet, 2023/11/19
- [taler-taler-ios] 23/30: unify P2P subject, gnunet, 2023/11/19
- [taler-taler-ios] 21/30: fix shortcuts, gnunet, 2023/11/19
- [taler-taler-ios] 26/30: badge for button, gnunet, 2023/11/19
- [taler-taler-ios] 15/30: ScrollVStack, gnunet, 2023/11/19