minor update on buttons and QR code to look better on iPad

pull/891/head
Ryan ZHAO 1 year ago
parent 5aaf02180a
commit ebf36c6251

@ -12,7 +12,6 @@ struct InviteAFriendScreen: View {
private let accountId: String = getUserHexEncodedPublicKey()
static private let cornerRadius: CGFloat = 13
static private let buttonWidth: CGFloat = 160
var body: some View {
ZStack(alignment: .center) {
@ -58,7 +57,7 @@ struct InviteAFriendScreen: View {
.font(.system(size: Values.mediumFontSize))
.foregroundColor(themeColor: .textPrimary)
.frame(
maxWidth: Self.buttonWidth,
maxWidth: .infinity,
minHeight: Values.mediumButtonHeight,
alignment: .center
)
@ -80,7 +79,7 @@ struct InviteAFriendScreen: View {
.font(.system(size: Values.mediumFontSize))
.foregroundColor(themeColor: .textPrimary)
.frame(
maxWidth: Self.buttonWidth,
maxWidth: .infinity,
minHeight: Values.mediumButtonHeight,
alignment: .center
)

@ -14,7 +14,7 @@ struct RecoveryPasswordScreen: View {
static private let cornerRadius: CGFloat = 13
static private let backgroundCornerRadius: CGFloat = 17
static private let buttonWidth: CGFloat = 130
static private let buttonWidth: CGFloat = UIDevice.current.isIPad ? Values.iPadButtonWidth : 130
public init() throws {
self.mnemonic = try Identity.mnemonic()
@ -136,7 +136,7 @@ struct RecoveryPasswordScreen: View {
.font(.system(size: Values.verySmallFontSize))
.foregroundColor(themeColor: .textPrimary)
.frame(
maxWidth: Self.buttonWidth,
maxWidth: .infinity,
minHeight: Values.mediumSmallButtonHeight,
alignment: .center
)
@ -157,7 +157,7 @@ struct RecoveryPasswordScreen: View {
.font(.system(size: Values.verySmallFontSize))
.foregroundColor(themeColor: .textPrimary)
.frame(
maxWidth: Self.buttonWidth,
maxWidth: .infinity,
minHeight: Values.mediumSmallButtonHeight,
alignment: .center
)

@ -72,6 +72,7 @@ struct QRCodeView: View {
static private var logoSize: CGFloat = 66
var body: some View {
ZStack(alignment: .center) {
ZStack(alignment: .center) {
RoundedRectangle(cornerRadius: Self.cornerRadius)
.fill(themeColor: backgroundThemeColor)
@ -109,5 +110,11 @@ struct QRCodeView: View {
)
}
}
.frame(
maxWidth: 400,
maxHeight: 400
)
}
.frame(maxWidth: .infinity)
}
}

Loading…
Cancel
Save