[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-0' - vcl/osx

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 27 19:27:05 UTC 2021


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

New commits:
commit 90a7e0bef20ad309c5215bd5c24bc7b8b5efa6ba
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Jan 27 14:36:00 2021 +0200
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Wed Jan 27 20:26:30 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 <tml at collabora.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110015
    Tested-by: Jenkins
    (cherry picked from commit 02bb41dd5197503d0d8b7d8be0a8cd220c0d1c85)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109988
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    (cherry picked from commit 1f400d35d61076c460a28b2b83dddc9297f38140)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109991
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 87d81d2ac5d8..49b0b2af4e67 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -321,14 +321,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];


More information about the Libreoffice-commits mailing list