This is what grieved me about some other LCL components as well. The developer *must* be able to control the look of a application. I've had many clients that specify a specify look and color choice for their applications, regardless of the desktop theme in use!
Why can't the background color be set to clDefault by default which then translates to whatever is specified by the current desktop theme. If the developer specifies any other color, like clBlue, the background is Blue. Why must the developer be forced to create a descendant component, just to be able to specify a specific color. Regards, - Graeme - On 23/08/07, 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; _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives