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 91e4df9
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 += UIMetrics.DisconnectSplitButton.secondaryButton.width

// 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 91e4df9

Please sign in to comment.