2
votes

I have a XUL button that I want to be 16x16, and I've done everything in my power to make it so:

<button image="chrome://npuff/content/images/gear_16.png"
        width="16" maxwidth="16" height="16"
        maxheight="16" style="width: 16px;"/>

The background image is 16x16. The button ends up being somewhere in the neighborhood of 16 pixels high, but is much wider than 16 pixels. If I set the width attributes to sufficiently high values, the button expands, but it never gets smaller than about 35-40 pixels. Is there some undocumented minimum width for XUL buttons that Firefox is enforcing? If some surrounding items are skewing its size somehow, how can I tell them to lay off my button? I'm able to put an <image> in the same space with the correct dimensions.

1

1 Answers

2
votes

Standard buttons (e.g. in alerts and dialogs) are expected to have a minimum width. This width is applied by the theme.