mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 21:29:26 +02:00
revert speedbutton shift changes
git-svn-id: trunk@13165 -
This commit is contained in:
parent
4db33cbc97
commit
2e480eb951
@ -888,22 +888,13 @@ end;
|
|||||||
function TCustomSpeedButton.DrawGlyph(ACanvas: TCanvas; const AClient: TRect;
|
function TCustomSpeedButton.DrawGlyph(ACanvas: TCanvas; const AClient: TRect;
|
||||||
const AOffset: TPoint; AState: TButtonState; ATransparent: Boolean;
|
const AOffset: TPoint; AState: TButtonState; ATransparent: Boolean;
|
||||||
BiDiFlags: Longint): TRect;
|
BiDiFlags: Longint): TRect;
|
||||||
var
|
|
||||||
NewOffset: TPoint;
|
|
||||||
begin
|
begin
|
||||||
if Assigned(FGlyph) then
|
if Assigned(FGlyph) then
|
||||||
begin
|
begin
|
||||||
if (AState = bsUp) and FMouseInControl then
|
if (AState = bsUp) and FMouseInControl then
|
||||||
AState := bsExclusive;
|
AState := bsExclusive;
|
||||||
if (AState = bsDown) or (Down = true) then
|
if (AState = bsDown) or (Down = true) then
|
||||||
begin
|
Result := FGlyph.Draw(ACanvas, AClient, point(AOffset.x + 1, AOffset.y + 1), AState, ATransparent, BiDiFlags)
|
||||||
NewOffset := Point(AOffset.x + 1, AOffset.y + 1);
|
|
||||||
if NewOffset.x + FGlyph.Width >= AClient.Right then
|
|
||||||
NewOffset.x := AOffset.x;
|
|
||||||
if NewOffset.y + FGlyph.Height >= AClient.Bottom then
|
|
||||||
NewOffset.y := AOffset.y;
|
|
||||||
Result := FGlyph.Draw(ACanvas, AClient, NewOffset, AState, ATransparent, BiDiFlags);
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
Result := FGlyph.Draw(ACanvas, AClient, AOffset, AState, ATransparent, BiDiFlags);
|
Result := FGlyph.Draw(ACanvas, AClient, AOffset, AState, ATransparent, BiDiFlags);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user