mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 08:38:19 +02:00
LCL: TCustomSpeedbutton now uses TControl.OnMouseEnter and TControl.OnMouseLeave from Luiz (bug #9399)
git-svn-id: trunk@11775 -
This commit is contained in:
parent
4cca6df0e3
commit
2d643365e0
@ -206,8 +206,6 @@ type
|
||||
FLayout: TButtonLayout;
|
||||
FMargin: integer;
|
||||
FMouseInControl: Boolean;
|
||||
FOnMouseEnter: TNotifyEvent;
|
||||
FOnMouseExit: TNotifyEvent;
|
||||
FShortcut: TShortCut;
|
||||
FShowAccelChar: boolean;
|
||||
FShowCaption: boolean;
|
||||
@ -279,8 +277,6 @@ type
|
||||
property ShowCaption: boolean read FShowCaption write SetShowCaption default true;
|
||||
property Spacing: integer read FSpacing write SetSpacing default 4;
|
||||
property Transparent: Boolean read FTransparent write SetTransparent default true;
|
||||
property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
|
||||
property OnMouseExit: TNotifyEvent read FOnMouseExit write FOnMouseExit;
|
||||
end;
|
||||
|
||||
|
||||
@ -312,7 +308,7 @@ type
|
||||
property OnDblClick;
|
||||
property OnMouseDown;
|
||||
property OnMouseEnter;
|
||||
property OnMouseExit;
|
||||
property OnMouseLeave;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property OnPaint;
|
||||
|
@ -907,14 +907,13 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomSpeedButton.MouseEnter;
|
||||
begin
|
||||
inherited MouseEnter;
|
||||
if csDesigning in ComponentState then exit;
|
||||
if not FMouseInControl
|
||||
and Enabled and (GetCapture = 0)
|
||||
then begin
|
||||
FMouseInControl := True;
|
||||
UpdateState(true);
|
||||
if Assigned(FOnMouseEnter) then FOnMouseEnter(Self);
|
||||
inherited MouseEnter;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -926,7 +925,6 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomSpeedButton.MouseLeave;
|
||||
begin
|
||||
inherited MouseLeave;
|
||||
if csDesigning in ComponentState then exit;
|
||||
///DebugLn(['TCustomSpeedButton.MouseLeave ',DbgSName(Self),' FMouseInControl=',FMouseInControl,' FDragging=',FDragging]);
|
||||
if FMouseInControl
|
||||
@ -939,7 +937,7 @@ begin
|
||||
FDragging:=false;
|
||||
end;
|
||||
UpdateState(true);
|
||||
if Assigned(FOnMouseExit) then FOnMouseExit(Self);
|
||||
inherited MouseLeave;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user