Fix: `button_padding` when using image+text buttons
Changes of the PR:
- fix
button_paddingfunctionality for buttons with images
Only the last comment of this PR is important. All other comments aren't relevant after my self review anymore.
TODO:
- [x] Unless this is a trivial change, add a line to the relevant
CHANGELOG.mdunder "Unreleased". - [x] run
cargo fmt - [x] run
cargo clippy - [x] self-review
- [x] run
./sh/check.sh
~~Question @reviewer: Should we maybe extend the margin feature to respect the text aswell, i.e. the right field of the Margin creates a margin on the right side of the text in the button instead?~~
~~Question @Reviewer: Should we maybe extend the margin feature to respect the text aswell, i.e. the
rightfield of theMargincreates a margin on the right side of the text in the button instead?~~
~~It seems like this would be the better solution as we already have the icon_spacing to configure the space between the image and the text. I implemented a PoC of the changes above and the example with image_margin(Margin::same(20.0)) and icon_spacing = 30.0; would look as follows:~~

I just noticed that the style option button_padding does the trick. It just wasn't applied to the left of the button when there was an image. Setting the button_padding to Vec2::splat(20.0) in the example above looks like this
before

after

Note that this makes much more sense, since I also explicitly set icon_spacing = 0.0, which isn't the case in the "before" picture.