mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:59:31 +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;
|
||||
const AOffset: TPoint; AState: TButtonState; ATransparent: Boolean;
|
||||
BiDiFlags: Longint): TRect;
|
||||
var
|
||||
NewOffset: TPoint;
|
||||
begin
|
||||
if Assigned(FGlyph) then
|
||||
begin
|
||||
if (AState = bsUp) and FMouseInControl then
|
||||
AState := bsExclusive;
|
||||
if (AState = bsDown) or (Down = true) then
|
||||
begin
|
||||
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
|
||||
Result := FGlyph.Draw(ACanvas, AClient, point(AOffset.x + 1, AOffset.y + 1), AState, ATransparent, BiDiFlags)
|
||||
else
|
||||
Result := FGlyph.Draw(ACanvas, AClient, AOffset, AState, ATransparent, BiDiFlags);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user