mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:19:19 +02:00
cocoa: proper detection of the dark theme. patch by Zoë Peterson. bug #37617
git-svn-id: trunk@63818 -
This commit is contained in:
parent
f89f1c10b4
commit
f0b7aadfd8
@ -147,12 +147,12 @@ begin
|
||||
Result := false;
|
||||
Exit;
|
||||
end;
|
||||
if (not NSApplication(NSApp).respondsToSelector(ObjCSelector('appearance'))) then begin
|
||||
if (not NSApplication(NSApp).respondsToSelector(ObjCSelector('effectiveAppearance'))) then begin
|
||||
Result := false;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
Result := IsAppearDark(NSApplication(NSApp).appearance);
|
||||
Result := IsAppearDark(NSApplication(NSApp).effectiveAppearance);
|
||||
end;
|
||||
|
||||
function IsWinDark(win: NSWindow): Boolean;
|
||||
@ -162,12 +162,12 @@ begin
|
||||
Result := false;
|
||||
Exit;
|
||||
end;
|
||||
if (not NSApplication(win).respondsToSelector(ObjCSelector('appearance'))) then begin
|
||||
if (not NSApplication(win).respondsToSelector(ObjCSelector('effectiveAppearance'))) then begin
|
||||
Result := false;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
Result := IsAppearDark(win.appearance);
|
||||
Result := IsAppearDark(win.effectiveAppearance);
|
||||
end;
|
||||
|
||||
function IsPaintDark: Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user