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;