diff options
| author | mojganii <mojgan.jelodar@mullvad.net> | 2025-07-01 13:46:30 +0200 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-07-17 14:05:24 +0200 |
| commit | 6e92f0fe096048770e534d30ca04087d4bc714a4 (patch) | |
| tree | c1ab9ce0daea35bfceff8b721f56032b30d99b37 /ios/MullvadVPN/View controllers/SelectLocation/LocationViewControllerWrapper.swift | |
| parent | ae02a1f9b790d5d8966b55f918227a0983789035 (diff) | |
| download | mullvadvpn-6e92f0fe096048770e534d30ca04087d4bc714a4.tar.xz mullvadvpn-6e92f0fe096048770e534d30ca04087d4bc714a4.zip | |
Fix dynamic sizing and layout issues across multiple views
- Fix font scaling and overlapping in device management
- Adjust font size for account number
- Scale info button dynamically
- Resolve dynamic size issues in:
- Settings
- IP overrides
- API access
- Filter view and filter chips
- Select location
- Edit API access method
- MullvadList
- Fix line breaks in settings view
- Unify padding across pages
Diffstat (limited to 'ios/MullvadVPN/View controllers/SelectLocation/LocationViewControllerWrapper.swift')
| -rw-r--r-- | ios/MullvadVPN/View controllers/SelectLocation/LocationViewControllerWrapper.swift | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/LocationViewControllerWrapper.swift b/ios/MullvadVPN/View controllers/SelectLocation/LocationViewControllerWrapper.swift index e7db58800e..b2e8ea61a0 100644 --- a/ios/MullvadVPN/View controllers/SelectLocation/LocationViewControllerWrapper.swift +++ b/ios/MullvadVPN/View controllers/SelectLocation/LocationViewControllerWrapper.swift @@ -46,7 +46,7 @@ final class LocationViewControllerWrapper: UIViewController { private var entryLocationViewController: LocationViewController? private let exitLocationViewController: LocationViewController - private let segmentedControl = UISegmentedControl() + private let segmentedControl = ScaledSegmentedControl() private let locationViewContainer = UIView() private var settings: LatestTunnelSettings private var relaySelectorWrapper: RelaySelectorWrapper @@ -204,10 +204,6 @@ final class LocationViewControllerWrapper: UIViewController { private func setUpSegmentedControl() { segmentedControl.backgroundColor = .SegmentedControl.backgroundColor segmentedControl.selectedSegmentTintColor = .SegmentedControl.selectedColor - segmentedControl.setTitleTextAttributes([ - .foregroundColor: UIColor.white, - .font: UIFont.systemFont(ofSize: 17, weight: .medium), - ], for: .normal) segmentedControl.insertSegment( withTitle: MultihopContext.entry.description, @@ -226,10 +222,11 @@ final class LocationViewControllerWrapper: UIViewController { private func addSubviews() { view.addConstrainedSubviews([segmentedControl, locationViewContainer]) { - segmentedControl.heightAnchor.constraint(equalToConstant: 44) + segmentedControl.heightAnchor.constraint(greaterThanOrEqualToConstant: 44) segmentedControl.pinEdgesToSuperviewMargins(PinnableEdges([.top(0), .leading(8), .trailing(8)])) locationViewContainer.pinEdgesToSuperview(.all().excluding(.top)) + locationViewContainer.topAnchor.constraint(equalTo: segmentedControl.bottomAnchor, constant: 8) if settings.tunnelMultihopState.isEnabled { locationViewContainer.topAnchor.constraint(equalTo: segmentedControl.bottomAnchor, constant: 4) @@ -324,7 +321,7 @@ private extension WireGuardObfuscationState { /// This flag affects whether the "Setting: Obfuscation" pill is shown when selecting a location var affectsRelaySelection: Bool { switch self { - case .shadowsocks: + case .shadowsocks, .quic: true default: false } |
