When I call ToggleButton::changeWidthToFitText() it seems to leave a lot of extra space to the right of the text, rather than fitting “neatly around its current text” as the docs state.
I’m curious why 60 is added to the width in the code below, when the tick box’s width is at most 20:
[code]void LookAndFeel::changeToggleButtonWidthToFitText (ToggleButton& button)
Font font (jmin (15.0f, button.getHeight() * 0.6f));
button.setSize (font.getStringWidth (button.getButtonText()) + 60, button.getHeight());