[Libreoffice] [PATCH] Bug 33794 - The "Open..." button of the initial screen needs more room for localization fdo#33794

Tomcsik Bence Tibor tomcsikbence at gmail.com
Fri Jan 13 15:30:54 PST 2012


Hello!

2012/1/13 Ivan Timofeev <timofeev.i.s at gmail.com>

> Hello,
>
> 13.01.2012 18:15, Tomcsik Bence Tibor пишет:
>
>> Hi,
>>
>> Bug 33794 solved.
>>
>
> IMHO it's better to pass some additional parameter to the layoutButton
> function ( e.g. int i_nExtraWidth = 0 ) and change:
>
>    nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on
> the safe side
>
> to:
>
>    nTextWidth += maButtonImageSize.Width() + 8 + i_nExtraWidth;
>
> ; then use i_nExtraWidth = 18 (as you suggested in the patch: 26 - 8 = 18)
> for the "Open..." button.
>
> What do you think?
>
> Regards,
> Ivan
>

You are absolutely right.
Because of your idea, I checked the code again, and I realized that I
calculated twice the widths.. There's no need to do the maximum search,
because the layoutButton function does it and hereafter considers the extra
width.
Passing the int i_nExtraWidth parameter to the layoutButton function will
fix the bug much easier.
Thank you for the idea. I send the new patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120114/1ca2f6a5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-I-added-a-new-parameter-to-the-layoutButton-function.patch
Type: text/x-patch
Size: 4576 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120114/1ca2f6a5/attachment-0001.bin>


More information about the LibreOffice mailing list