commit c4e4ad0c52accf8261493cf4780065a7a834bca1
parent 856c05ae94fbe17e9788e2873cb780015c7d6cde
Author: Marc Stibane <marc@taler.net>
Date: Thu, 6 Jul 2023 18:05:09 +0200
ThreeAmounts
Diffstat:
2 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/AmountView.swift b/TalerWallet1/Views/HelperViews/AmountView.swift
@@ -9,16 +9,23 @@ struct AmountView: View {
let value: String
let color: Color
let large: Bool // set to false for QR or IBAN
+
var body: some View {
- VStack {
+ VStack(alignment: .leading) {
Text(title)
- .font(.title3)
- Text(value)
- .font(large ? .largeTitle : .title)
- .fontWeight(large ? .medium : .regular)
- .foregroundColor(color)
+ .multilineTextAlignment(.leading)
+ .font(.body)
+ HStack {
+ Spacer()
+ Text(value)
+ .multilineTextAlignment(.center)
+ .font(large ? .title : .title2)
+// .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *)
+ .foregroundColor(color)
+ Spacer()
+ }
}
- .frame(maxWidth: .infinity, alignment: .center)
+ .frame(maxWidth: .infinity, alignment: .leading)
.listRowSeparator(.hidden)
}
}
diff --git a/TalerWallet1/Views/Transactions/ThreeAmounts.swift b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
@@ -64,18 +64,23 @@ struct ThreeAmountsView: View {
color: foreColor,
large: large)
if let baseURL {
- VStack {
+ VStack(alignment: .leading) {
Text(incoming ? "from Exchange:" : "to Exchange:")
- .font(.title3)
- Text(baseURL.trimURL())
- .font(large ? .title : .title2)
- .fontWeight(large ? .medium : .regular)
- .foregroundColor(labelColor)
+ .multilineTextAlignment(.leading)
+ .font(.body)
+ HStack {
+ Spacer()
+ Text(baseURL.trimURL())
+ .multilineTextAlignment(.center)
+ .font(large ? .title : .title2)
+ // .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *)
+ .foregroundColor(labelColor)
+ Spacer()
+ }
}
.padding(.top, 4)
- .frame(maxWidth: .infinity, alignment: .center)
+ .frame(maxWidth: .infinity, alignment: .leading)
.listRowSeparator(.hidden)
-
}
if let status {
HStack {
@@ -99,7 +104,7 @@ struct ThreeAmounts_Previews: PreviewProvider {
txActions: [])
Group {
List {
- ThreeAmountsSheet(common: common, topTitle: "Withdrawal", baseURL: DEMOEXCHANGE, large: 1==1)
+ ThreeAmountsSheet(common: common, topTitle: "Withdrawal", baseURL: DEMOEXCHANGE, large: 1==0)
.safeAreaInset(edge: .bottom) {
Button(String(localized: "Accept"), action: {})
.buttonStyle(TalerButtonStyle(type: .prominent))