Hello!<br><br><div class="gmail_quote">2012/1/13 Ivan Timofeev <span dir="ltr">&lt;<a href="mailto:timofeev.i.s@gmail.com">timofeev.i.s@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
13.01.2012 18:15, Tomcsik Bence Tibor пишет:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Bug 33794 solved.<br>
</blockquote>
<br>
IMHO it&#39;s better to pass some additional parameter to the layoutButton function ( e.g. int i_nExtraWidth = 0 ) and change:<br>
<br>
    nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the safe side<br>
<br>
to:<br>
<br>
    nTextWidth += maButtonImageSize.Width() + 8 + i_nExtraWidth;<br>
<br>
; then use i_nExtraWidth = 18 (as you suggested in the patch: 26 - 8 = 18) for the &quot;Open...&quot; button.<br>
<br>
What do you think?<br>
<br>
Regards,<br>
Ivan<br>
</blockquote></div><br>You are absolutely right.<br>Because of your idea, I checked the code again, and I realized that I calculated twice the widths.. There&#39;s no need to do the maximum search, because the layoutButton function does it and hereafter considers the extra width.<br>
Passing the int i_nExtraWidth parameter to the layoutButton function will fix the bug much easier.<br>Thank you for the idea. I send the new patch.<br>