From 4c83ec23729d18f141f5fc42ca686267e6ce4733 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 1 Sep 2022 10:38:10 +0200 Subject: [PATCH] macOS: Do not partially switch light/dark when system switches If during the runtime of Qt Creator macOS switches the system theme between "dark" and "light", Qt Creator should not partially switch its appearance. Since Qt Creator does not support switching the theme at runtime, it must stay fixed on the appearance of the selected theme. The code previously only forced Qt Creator's macOS appearance if there was a mismatch on startup. So if you started a light (or default) Qt Creator theme while the system was in light mode, Qt Creator's macOS appearance stayed at the "default for the system", and if the system was changed to dark mode, Qt Creator would follow that partially in the styling of standard controls only. Instead always force Qt Creator's macOS appearance. Fixes: QTCREATORBUG-28066 Change-Id: I0eb8fcbc6cf9d2b3e548dd871b9a3e1e611c136a Reviewed-by: Marcus Tillmanns Reviewed-by: Reviewed-by: Christian Stenger --- src/libs/utils/theme/theme_mac.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libs/utils/theme/theme_mac.mm b/src/libs/utils/theme/theme_mac.mm index 3ee512c7ca8..ea59bfb17e9 100644 --- a/src/libs/utils/theme/theme_mac.mm +++ b/src/libs/utils/theme/theme_mac.mm @@ -32,8 +32,6 @@ bool currentAppearanceMatches(bool dark) void forceMacAppearance(bool dark) { - if (currentAppearanceMatches(dark)) - return; #if __has_builtin(__builtin_available) if (__builtin_available(macOS 10.14, *)) #else // Xcode 8