From 7f09c7e43c670e84f57debc811df3604744eb140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Em=C4=ABls?= Date: Thu, 24 Oct 2024 10:45:25 +0200 Subject: [PATCH] Adjust leading inset for primary button The size of the secondary button wasn't being used to adjust the insets of the disconnect button. I've gone and done did make it do it now. Feel free to reject or suggest a better solution. --- .../View controllers/Tunnel/DisconnectSplitButton.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/MullvadVPN/View controllers/Tunnel/DisconnectSplitButton.swift b/ios/MullvadVPN/View controllers/Tunnel/DisconnectSplitButton.swift index 58bb6819bac4..f8540fa831bb 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/DisconnectSplitButton.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/DisconnectSplitButton.swift @@ -42,6 +42,8 @@ class DisconnectSplitButton: UIView { secondaryButton.heightAnchor.constraint(equalToConstant: secondaryButtonSize.height) } + primaryButton.configuration?.contentInsets.leading += secondaryButtonSize + // Ideally, we shouldn't need to manually resize the image ourselves. // However, since UIButton.Configuration doesn't provide a direct property // for controlling image scaling (like imageScaling or contentMode in other contexts),