commit 941416726a2eca527e087c370236c43a51815c76
parent 59c2baf2e372ba134fe7d6761998893f14b74ae8
Author: Marc Stibane <marc@taler.net>
Date: Tue, 22 Apr 2025 11:48:30 +0200
hideTitle
Diffstat:
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift
@@ -82,7 +82,7 @@ struct ActionsSheet: View {
let recvDisabled = controller.balances.count == 0
SendRequestV(stack: stack.push(), sendDisabled: sendDisabled, recvDisabled: recvDisabled)
DepositWithdrawV(stack: stack.push(), sendDisabled: sendDisabled, recvDisabled: recvDisabled)
- QRButton(isNavBarItem: false) {
+ QRButton(hideTitle: false) {
qrButtonTapped = true
}
.lineLimit(5)
diff --git a/TalerWallet1/Views/HelperViews/Buttons.swift b/TalerWallet1/Views/HelperViews/Buttons.swift
@@ -62,7 +62,7 @@ struct LinkButton: View {
}
struct QRButton : View {
- let isNavBarItem: Bool
+ let hideTitle: Bool
let action: () -> Void
@AppStorage("minimalistic") var minimalistic: Bool = false
@@ -114,17 +114,13 @@ struct QRButton : View {
let qrImage = Image(systemName: QRBUTTON)
let qrText = Text("\(qrImage)", comment: "QR Image")
Button(action: checkCameraAvailable) {
- if isNavBarItem {
- if !minimalistic {
- Text("Scan QR", comment: "Button title")
- .talerFont(.title3)
- }
- qrText.talerFont(.title2)
+ if hideTitle {
+ qrText.talerFont(.largeTitle)
+ .padding(.horizontal)
} else if minimalistic {
let width = UIScreen.screenWidth / 7
qrText.talerFont(.largeTitle)
.padding(.horizontal, width)
-// .padding(.vertical)
} else {
HStack(spacing: 16) {
qrText.talerFont(.title)
diff --git a/TalerWallet1/Views/OIM/OIMView.swift b/TalerWallet1/Views/OIM/OIMView.swift
@@ -70,7 +70,7 @@ struct OIMView: View {
let currency = cash.currency
let actions = HStack(spacing: 30) {
- QRButton(isNavBarItem: false) {
+ QRButton(hideTitle: true) {
qrButtonTapped = true
}
.lineLimit(5)