Felipe Monteiro de Carvalho ha scritto:
[...]
I didn't commit the patch to lcl/include/buttonglyph.inc because I
didn't understand it and I am not sure about it ... so I am leaving it
for someone else.
It's soon explained. The patch reverts this portion of code to the
situation which has been working for a long time (see rev. 10808 - ver.
0.9.22 - which btw already had the speedbutton.inc bug).
Someone, with the good proposition to improve it, added an unnecessary
modification of the destination rectangle. It's unnecessary, because
previous calculations already center both glyph and text in the widget
client area, and subsequently the resulting image is properly clipped
against widget's client area. Unfortunately, he/she did it wrong. If you
increment the Right property, and decrement the Left one, you decrease
the rectangle area, up to make it negative. The same holds true for Top
and Bottom. Removing the "improvement", Text and Glyph are properly
positioned, properly centered, and properly clipped if they don't fit.
It's easy to check just from the IDE.
Cheers,
Giuliano
--
Giuliano Colla
Still using C++ and Visual Studio? I'm using Object Pascal and Lazarus.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives