Skip to content

Commit

Permalink
Adjust leading inset for primary button
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pinkisemils committed Oct 24, 2024
1 parent eba4129 commit b104096
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class DisconnectSplitButton: UIView {
secondaryButton.heightAnchor.constraint(equalToConstant: secondaryButtonSize.height)
}

primaryButton.configuration?.contentInsets.leading += secondaryButtonSize

Check failure on line 45 in ios/MullvadVPN/View controllers/Tunnel/DisconnectSplitButton.swift

View workflow job for this annotation

GitHub Actions / Unit tests

cannot convert value of type 'CGSize' to expected argument type 'CGFloat'

// 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),
Expand Down

0 comments on commit b104096

Please sign in to comment.