DrawableButton::ButtonStyle::ImageOnButtonBackground draws an image on the background of the button, but the image is resized to match the button’s proportions, which isn’t always desired. I believe it’s a relatively common use case not wanting to resize the image, e.g., when getting an image with the correct size from a UI designer, but still wanting to use the default button borders (making
DrawableButton::ButtonStyle::ImageRaw an invalid alternative).
It would be nice to have a style which keeps the original image size. The code change would be minimal; for the new style, the
DrawableButton::resized function would have to pass into
RectanglePlacement::doNotResize flag in addition to the existing
Currently, I worked around this by overriding