Browse Source

on MacOS enter and leave happen when control is disabled

Johann ELSASS 5 years ago
parent
commit
a75d637bfc
1 changed files with 10 additions and 4 deletions
  1. 10 4
      bgrathemebutton.pas

+ 10 - 4
bgrathemebutton.pas

@@ -61,15 +61,21 @@ end;
 procedure TBGRAThemeButton.MouseEnter;
 begin
   inherited MouseEnter;
-  FState := btbsHover;
-  Invalidate;
+  if FState <> btbsDisabled then
+  begin
+    FState := btbsHover;
+    Invalidate;
+  end;
 end;
 
 procedure TBGRAThemeButton.MouseLeave;
 begin
   inherited MouseLeave;
-  FState := btbsNormal;
-  Invalidate;
+  if FState <> btbsDisabled then
+  begin
+    FState := btbsNormal;
+    Invalidate;
+  end;
 end;
 
 procedure TBGRAThemeButton.MouseDown(Button: TMouseButton; Shift: TShiftState;