mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-05 16:39:32 +01:00
TSpeedButton.Transparent is now more Delphi compatible
git-svn-id: trunk@9337 -
This commit is contained in:
parent
f7a735f0f0
commit
974c61c74f
@ -279,6 +279,8 @@ begin
|
|||||||
if FFlat and not FMouseInControl and not (FState in [bsDown, bsExclusive]) then
|
if FFlat and not FMouseInControl and not (FState in [bsDown, bsExclusive]) then
|
||||||
begin
|
begin
|
||||||
Result := DFCS_FLAT;
|
Result := DFCS_FLAT;
|
||||||
|
if not Enabled then
|
||||||
|
inc(Result,DFCS_INACTIVE)
|
||||||
end else begin
|
end else begin
|
||||||
Result:=DFCS_BUTTONPUSH;
|
Result:=DFCS_BUTTONPUSH;
|
||||||
if FState in [bsDown, bsExclusive] then
|
if FState in [bsDown, bsExclusive] then
|
||||||
@ -413,13 +415,9 @@ begin
|
|||||||
// do not draw anything if flat and mouse not in control (simplified)
|
// do not draw anything if flat and mouse not in control (simplified)
|
||||||
if Transparent then begin
|
if Transparent then begin
|
||||||
if (FLastDrawFlags and DFCS_FLAT) = 0 then begin
|
if (FLastDrawFlags and DFCS_FLAT) = 0 then begin
|
||||||
if MouseInControl then begin
|
|
||||||
if (FLastDrawFlags and DFCS_PUSHED) <>0 then xBevel := bvLowered
|
if (FLastDrawFlags and DFCS_PUSHED) <>0 then xBevel := bvLowered
|
||||||
else xBevel := bvRaised;
|
else xBevel := bvRaised;
|
||||||
Canvas.Frame3D(PaintRect,1,xBevel);
|
Canvas.Frame3D(PaintRect,1,xBevel);
|
||||||
end else if (FLastDrawFlags and DFCS_PUSHED) <>0 then begin
|
|
||||||
Canvas.Frame3D(PaintRect,1,bvLowered);
|
|
||||||
end;
|
|
||||||
InflateRect(PaintRect, -1, -1);
|
InflateRect(PaintRect, -1, -1);
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
@ -745,7 +743,6 @@ procedure TCustomSpeedButton.MouseEnter;
|
|||||||
begin
|
begin
|
||||||
inherited MouseEnter;
|
inherited MouseEnter;
|
||||||
if csDesigning in ComponentState then exit;
|
if csDesigning in ComponentState then exit;
|
||||||
|
|
||||||
if not FMouseInControl
|
if not FMouseInControl
|
||||||
and Enabled and (GetCapture = 0)
|
and Enabled and (GetCapture = 0)
|
||||||
then begin
|
then begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user