mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 19:32:49 +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;
|
FLayout: TButtonLayout;
|
||||||
FMargin: integer;
|
FMargin: integer;
|
||||||
FMouseInControl: Boolean;
|
FMouseInControl: Boolean;
|
||||||
FOnMouseEnter: TNotifyEvent;
|
|
||||||
FOnMouseExit: TNotifyEvent;
|
|
||||||
FShortcut: TShortCut;
|
FShortcut: TShortCut;
|
||||||
FShowAccelChar: boolean;
|
FShowAccelChar: boolean;
|
||||||
FShowCaption: boolean;
|
FShowCaption: boolean;
|
||||||
@ -279,8 +277,6 @@ type
|
|||||||
property ShowCaption: boolean read FShowCaption write SetShowCaption default true;
|
property ShowCaption: boolean read FShowCaption write SetShowCaption default true;
|
||||||
property Spacing: integer read FSpacing write SetSpacing default 4;
|
property Spacing: integer read FSpacing write SetSpacing default 4;
|
||||||
property Transparent: Boolean read FTransparent write SetTransparent default true;
|
property Transparent: Boolean read FTransparent write SetTransparent default true;
|
||||||
property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
|
|
||||||
property OnMouseExit: TNotifyEvent read FOnMouseExit write FOnMouseExit;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -312,7 +308,7 @@ type
|
|||||||
property OnDblClick;
|
property OnDblClick;
|
||||||
property OnMouseDown;
|
property OnMouseDown;
|
||||||
property OnMouseEnter;
|
property OnMouseEnter;
|
||||||
property OnMouseExit;
|
property OnMouseLeave;
|
||||||
property OnMouseMove;
|
property OnMouseMove;
|
||||||
property OnMouseUp;
|
property OnMouseUp;
|
||||||
property OnPaint;
|
property OnPaint;
|
||||||
|
@ -907,14 +907,13 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomSpeedButton.MouseEnter;
|
procedure TCustomSpeedButton.MouseEnter;
|
||||||
begin
|
begin
|
||||||
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
|
||||||
FMouseInControl := True;
|
FMouseInControl := True;
|
||||||
UpdateState(true);
|
UpdateState(true);
|
||||||
if Assigned(FOnMouseEnter) then FOnMouseEnter(Self);
|
inherited MouseEnter;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -926,7 +925,6 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomSpeedButton.MouseLeave;
|
procedure TCustomSpeedButton.MouseLeave;
|
||||||
begin
|
begin
|
||||||
inherited MouseLeave;
|
|
||||||
if csDesigning in ComponentState then exit;
|
if csDesigning in ComponentState then exit;
|
||||||
///DebugLn(['TCustomSpeedButton.MouseLeave ',DbgSName(Self),' FMouseInControl=',FMouseInControl,' FDragging=',FDragging]);
|
///DebugLn(['TCustomSpeedButton.MouseLeave ',DbgSName(Self),' FMouseInControl=',FMouseInControl,' FDragging=',FDragging]);
|
||||||
if FMouseInControl
|
if FMouseInControl
|
||||||
@ -939,7 +937,7 @@ begin
|
|||||||
FDragging:=false;
|
FDragging:=false;
|
||||||
end;
|
end;
|
||||||
UpdateState(true);
|
UpdateState(true);
|
||||||
if Assigned(FOnMouseExit) then FOnMouseExit(Self);
|
inherited MouseLeave;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user