DrawableButton Indent

Is there a way to remove the indent in a DrawableButton?

Can’t remember offhand, but you could always override the paint method if you need some really custom stuff.

Well I want to have two DrawableButtons that share an edge like you can do with normal buttons. If I use the ImageRaw ButtonStyle then everything works fine but the image won’t resize to the button size. If I use ImageFitted the image is inset so it won’t line up with button next to it. Here’s the offending code in DrawableButton.cpp

[code] const int textH = (style == ImageAboveTextLabel)
? jmin (16, proportionOfHeight (0.25f))
: 0;

    const int indentX = jmin (3, proportionOfWidth (0.05f));
    const int indentY = jmin (3, proportionOfHeight (0.05f));

    imageSpace.setBounds (indentX, indentY,
                          getWidth() - indentX * 2,
                          getHeight() - indentY * 2 - textH);


Is there any reason to have an inset?

well you do often want an inset, so that the button can have a hit region bigger than the image itself. But I’ll see if I can find a neat way to make it optional.

ahh, that makes sense. thanks :smiley: