lcl: removed visual defect when pressing speedbutton when using certain backgroud colors, described in bug #8662

git-svn-id: trunk@10937 -
This commit is contained in:
jesus 2007-04-11 18:57:10 +00:00
parent cddc182023
commit dc067a5a2b

View File

@ -593,7 +593,10 @@ begin
else begin
// if pushed, move text 1 pixel right and down
if (FLastDrawFlags and DFCS_PUSHED) <>0 then
OffsetRect(PaintRect, 1, 1);
begin
Inc(PaintRect.Left, 1);
Inc(PaintRect.Top, 1);
end;
end;
//DebugLn(['TCustomSpeedButton.Paint PaintRect=',PaintRect.Left,',',PaintRect.TOp,',',PaintRect.Right,',',PaintRect.Bottom,caption,', ', TXTStyle.SystemFont]);
Canvas.TextRect(PaintRect, PaintRect.Left, PaintRect.Top, Caption, TXTStyle);