From d35debcacf37dc2bd38f80ae893d39903955e93e Mon Sep 17 00:00:00 2001 From: Nuo Xu Date: Tue, 17 Dec 2024 09:16:27 -0800 Subject: [PATCH] fix(vpn): Centre alignment on text in server selection pop-up (#27034) --- .../BraveVPNRegionConfirmationView.swift | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/ios/brave-ios/Sources/BraveVPN/Components/Region/BraveVPNRegionConfirmationView.swift b/ios/brave-ios/Sources/BraveVPN/Components/Region/BraveVPNRegionConfirmationView.swift index 7050a08c9878..00a81f35a593 100644 --- a/ios/brave-ios/Sources/BraveVPN/Components/Region/BraveVPNRegionConfirmationView.swift +++ b/ios/brave-ios/Sources/BraveVPN/Components/Region/BraveVPNRegionConfirmationView.swift @@ -25,32 +25,26 @@ public struct BraveVPNRegionConfirmationView: View { .resizable() .frame(width: 96, height: 96) Text(Strings.VPN.vpnRegionChangedTitle) - .multilineTextAlignment(.center) .font(.headline) .foregroundStyle(Color(braveSystemName: .textPrimary)) - HStack { - countryFlag - .frame(width: 32, height: 32) - .padding(4) - .overlay( - RoundedRectangle(cornerRadius: 12.0, style: .continuous) - .strokeBorder(Color(.lightGray), lineWidth: 1.0) - ) - VStack(alignment: .leading) { + VStack { + HStack(alignment: .center) { + countryFlag + .frame(width: 32, height: 32) if let country = country { Text(country) .font(.headline) .foregroundStyle(Color(braveSystemName: .textPrimary)) } - if let city = city { - Text(city) - .font(.subheadline) - .foregroundStyle(Color(braveSystemName: .textSecondary)) - } + } + if let city = city { + Text(city) + .font(.subheadline) + .foregroundStyle(Color(braveSystemName: .textSecondary)) } } - .frame(maxWidth: .infinity, alignment: .leading) } + .multilineTextAlignment(.center) .padding(48) .frame(maxWidth: 350) .background(Color(braveSystemName: .iosBrowserElevatedIos))