Bug:
if a speed button with a caption is disabled the "disabled" glyph is
shown, and the caption is properly grayed and sunken, but when it is
re-enabled, the glyph reverts to the proper state, but the caption font
keeps the "disabled" color (i.e. clBtnHIghlight).
The attached patch solves the problem (an *else* clause was missing).
Regards,
Giuliano
Index: speedbutton.inc
===================================================================
--- speedbutton.inc (revisione 9401)
+++ speedbutton.inc (copia locale)
@@ -552,7 +552,8 @@
Canvas.TextRect(PaintRect, PaintRect.Left, PaintRect.Top, Caption,
TXTStyle);
Canvas.Font.Color := clBtnShadow;
OffsetRect(PaintRect, -1, -1);
- end;
+ end
+ else Canvas.Font.Color := Font.Color;
//DebugLn('TCustomSpeedButton.Paint
PaintRect=',PaintRect.Left,',',PaintRect.TOp,',',PaintRect.Right,',',PaintRect.Bottom,caption);
Canvas.TextRect(PaintRect, PaintRect.Left, PaintRect.Top, Caption,
TXTStyle);
end;