Ver Fonte

on MacOS enter and leave happen when control is disabled

Johann ELSASS há 5 anos atrás
pai
commit
a75d637bfc
1 ficheiros alterados com 10 adições e 4 exclusões
  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;