commit 4f433c414f9a99354909456f6efb8c9686224c33 parent 2f5555f6e6e216527ea6bfce9aafc5ca71be7dec Author: Marc Stibane <marc@taler.net> Date: Tue, 10 Oct 2023 19:44:20 +0200 Layout for QR-View and ThreeAmounts Diffstat:
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/AmountView.swift b/TalerWallet1/Views/HelperViews/AmountView.swift @@ -25,7 +25,6 @@ struct AmountView: View { .accessibilityFont(large ? .title : .title2) // .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *) .monospacedDigit() - Spacer() } } .frame(maxWidth: .infinity, alignment: .leading) diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift @@ -14,40 +14,43 @@ struct QRCodeDetailView: View { var body: some View { if talerURI.count > 10 { - VStack (alignment: .leading) { + Section { Text("Either") .multilineTextAlignment(.leading) .accessibilityFont(.title3) // .padding(.vertical) + .listRowSeparator(.hidden) CopyShare(textToCopy: talerURI) .disabled(false) // .padding(.bottom) + .listRowSeparator(.hidden) let otherParty = incoming ? String(localized: "payer") : String(localized: "payee") Text("the link to the \(otherParty), or", comment: "(copy/share) the link to the other party (payer/payee), or") .multilineTextAlignment(.leading) .accessibilityFont(.title3) + .listRowSeparator(.hidden) HStack { Spacer() QRGeneratorView(text: talerURI) Spacer() } + .listRowSeparator(.hidden) // TODO: use currency formatter instead of .readableDescription - let amountStr = (amount == nil) ? + let hintStr = (amount == nil) ? (incoming ? String(localized: "let the payer scan this QR code to pay.") : String(localized: "let the payee scan this QR code to receive.")) : (incoming ? String(localized: "let the payer scan this QR code to pay \(amount!.readableDescription).", - comment: "amount.readableDescription: 5,3 €") + comment: "e.g. '5,3 €'") : String(localized: "let the payee scan this QR code to receive \(amount!.readableDescription).", - comment: "amount.readableDescription: 7.41 $")) - Text(amountStr) + comment: "e.g. '$ 7.41'")) + Text(hintStr) .fixedSize(horizontal: false, vertical: true) // wrap in scrollview .accessibilityFont(.title3) - .padding(.top) } } } diff --git a/TalerWallet1/Views/Transactions/ThreeAmounts.swift b/TalerWallet1/Views/Transactions/ThreeAmounts.swift @@ -46,15 +46,14 @@ struct ThreeAmountsView: View { let labelColor = Color(UIColor.label) let foreColor = pending ? WalletColors().pendingColor(incoming) : WalletColors().transactionColor(incoming) - VStack { + Section { AmountView(title: topTitle, value: topAmount.readableDescription, color: labelColor, large: large) .padding(.bottom, 4) if let fee { - let feeSign = incoming ? "- " : "+ " - AmountView(title: feeSign + String(localized: "Exchange fee:"), + AmountView(title: String(localized: "Exchange fee:"), value: fee.readableDescription, color: labelColor, large: false) @@ -73,10 +72,9 @@ struct ThreeAmountsView: View { Spacer() Text(baseURL.trimURL()) .multilineTextAlignment(.center) - .accessibilityFont(large ? .title2 : .title3) + .accessibilityFont(large ? .title3 : .body) // .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *) .foregroundColor(labelColor) - Spacer() } } .padding(.top, 4) diff --git a/TalerWallet1/Views/Transactions/TransactionDetailView.swift b/TalerWallet1/Views/Transactions/TransactionDetailView.swift @@ -77,7 +77,7 @@ struct TransactionDetailView: View { Spacer() Text("Status: \(common.txState.major.localizedState)") } .listRowSeparator(.automatic) - .accessibilityFont(.title2) + .accessibilityFont(.title) SwitchCase(transaction: $transaction, hasDone: doneAction != nil) if transaction.isAbortable { if let abortAction {