vcl/osx/salinst.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 02bb41dd5197503d0d8b7d8be0a8cd220c0d1c85
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Wed Jan 27 14:36:00 2021 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Wed Jan 27 15:47:08 2021 +0100

    NSApplication's appearance property exists in macOS 10.14 and later only
    
    Change-Id: I12f586d91e40da130f59eeba3ab65e07eec088d3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110013
    Tested-by: Tor Lillqvist <t...@collabora.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110015
    Tested-by: Jenkins

diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index f44bf282a9cd..748655c86641 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -308,14 +308,16 @@ VCLPLUG_OSX_PUBLIC SalInstance* create_SalInstance()
 
     // TODO: After implementation of dark mode, this code has to be removed.
 
-    if (getenv("VCL_MACOS_FORCE_DARK_MODE"))
+    if (@available(macOS 10.14, iOS 13, *))
     {
-        if (@available(macOS 10.14, iOS 13, *))
+        if (getenv("VCL_MACOS_FORCE_DARK_MODE"))
+        {
             [NSApp setAppearance: [NSAppearance appearanceNamed: 
NSAppearanceNameDarkAqua]];
+        }
+        else
+            if (!getenv("VCL_MACOS_USE_SYSTEM_APPEARANCE"))
+                [NSApp setAppearance: [NSAppearance appearanceNamed: 
NSAppearanceNameAqua]];
     }
-    else
-        if (!getenv("VCL_MACOS_USE_SYSTEM_APPEARANCE"))
-           [NSApp setAppearance: [NSAppearance appearanceNamed: 
NSAppearanceNameAqua]];
 
     // activate our delegate methods
     [NSApp setDelegate: NSApp];
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to