summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/osx/salinst.cxx12
1 files changed, 7 insertions, 5 deletions
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];