On Thu, 23 Aug 2007 17:32:04 +0300
"Stephano" <[EMAIL PROTECTED]> wrote:
> As per the current implementation, TSpeedbutton's background is
> mostly dependent on themes. I would like to submit a patch that will
> extract the background painting code into a separate virtual
> protected method (TCustomSpeedButton.PaintBackground), thus allowing
> a descendant to control its background painting by overriding this
> method while leaving the foreground handling to TSpeedButton. Any
> input would be appreciated.
>
> procedure TCustomSpeedButton.PaintBackground(var PaintRect: TRect);
> begin
> FLastDrawDetails := GetDrawDetails;
> if not Transparent and
> ThemeServices.HasTransparentParts(FLastDrawDetails) then begin
> Canvas.Brush.Color := Color;
> Canvas.FillRect(PaintRect);
> end;
> ThemeServices.DrawElement(Canvas.Handle, FLastDrawDetails,
> PaintRect); PaintRect := ThemeServices.ContentRect(Canvas.Handle,
> FLastDrawDetails, PaintRect); end;
Applied. Thanks.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives