Giuliano Colla wrote:
Marc Weustink ha scritto:
Giuliano Colla wrote:
Here's it again
The attached patch fixes 2 issues for TSpeedButton:
1) With no Caption, the glyph is centered if Layout is Glyph Left or
Glyph right, somewhere up or down with Glyph Top or Glyph Bottom.
Reason: in speedbutton.inc, if Caption is empty, Result.CX is set twice
to zero while Result.CY is left undetermined.
This one is OK
2) With a Caption, the glyph disappears if the layout is Glyph Bottom or
Glyph Right.
Reason: the calculation increases Left (or Top) of the destination
rectangle of the offset amount, and decreases Right (or Bottom) of the
same quantity, determining a negative width (or height)
This one is ok alos I think. But when seeing the speedbutton code, I
think the whole needs a review. Why for instance has the oamge an
offset when pressed and the text not ?
Further I found setting the Shortcut in the paintroutine... !!
I just submitted a fix for what were unmistakably bugs.
Thats ok.
Then I have
extended my revision of TSpeedButton, for my needs, adding the offset to
text when pressed, changing color when pressed (if not transparent),
etc. If nobody else undertakes the task, I'll continue my review and
I'll submit another patch, taking into account also what you've noticed.
OK.
It was more an explanation (also for myself) why it wasn't committed
directly.
marc
Giuliano
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives