mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 14:35:58 +02:00
Cocoa: TSpeedButton: set the highlighted background color when pressed, consistent with win32
before, TSpeedButton had a white highlighted background color when it was normal, and a gray background when it was pressed, causing confusion to users.
This commit is contained in:
parent
eb65e0684e
commit
feae93368d
@ -898,6 +898,8 @@ begin
|
||||
BtnType := NSPushOnPushOffButton;
|
||||
BezelStyle := BezelButton;
|
||||
useBezel := true;
|
||||
if IsPushed(Details) then
|
||||
btn.setBackgroundColor(NSColor.selectedTextBackgroundColor);
|
||||
end;
|
||||
else
|
||||
Result := false;
|
||||
@ -922,6 +924,7 @@ begin
|
||||
btn.setHighlighted( IsPushed(Details));
|
||||
|
||||
if ((Details.Element = teToolBar) and (not IsPushed(Details)) and (not IsChecked(Details)))
|
||||
or ((Details.Element = teButton) and (Details.Part = BP_PUSHBUTTON) and IsPushed(Details))
|
||||
or ((Details.Element = teButton) and (Details.Part = BP_CHECKBOX))
|
||||
then
|
||||
// this is "flat" mode. So unpushed state should draw no borders
|
||||
|
Loading…
Reference in New Issue
Block a user