gNeandr wrote:
> On 18.02.2012 01:04, Neil wrote:
>
>> gNeandr wrote:
>>
>>> This is set with the button:
>>> width="120"
>>>
>>> If I set manually width="100" to XUL:label using DOMi I get the
>>> label on the button cropped.
>>> Note: I have to use 120 for button and 100 for XUL:label to have
>>> fitted the cropped label in the button box.
>>>
>>> If that's the solution, how to set that 'smaller' width directly to
>>> XUL:label?
>>
>> Themes typically set a minimum width on buttons, so if you want a
>> small button you might need to override it with minwidth="0".
>
> minwidth="0" doesn't help. (on Xubuntu, not tested with W7)
Actually it's the flex you need to be worried about.
If you have a look at a toolbarbutton, that uses <xul:label flex="1">,
so you're free to crop it at will. But an ordinary button label has no
flex by default. This is so that the icon (for Linux iconic buttons) can
appear next to the label, despite the minimum width of the button making
the button wider than the label. Sorry, but by default I don't think
it's possible to achieve that effect and still allow the label to crop.