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... !!
So if someone can aply both its OK (I don't have a lcl trunk atm)
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives