From d9a53a92fc0b945a9b39c1f5c3d6f769e2de0eec Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 14 Aug 2023 07:26:54 +0300 Subject: [PATCH] When dealing with a system that supports native dark mode and Qt that doesn't, activate only custom dark theme to mimic dark mode and nothing in case of light mode. --- src/libs/vmisc/theme/vtheme.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/vmisc/theme/vtheme.cpp b/src/libs/vmisc/theme/vtheme.cpp index f49421615..0f940e8b8 100644 --- a/src/libs/vmisc/theme/vtheme.cpp +++ b/src/libs/vmisc/theme/vtheme.cpp @@ -230,7 +230,7 @@ void ActivateDefaultThemeWin() } else { - ActivateCustomLightTheme(); + qApp->setStyleSheet(QString()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast) } #endif // QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) } @@ -249,7 +249,7 @@ void ActivateDefaultThemeMac() } else { - ActivateCustomLightTheme(); + qApp->setStyleSheet(QString()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast) } #endif // QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) } @@ -269,7 +269,7 @@ void ActivateDefaultTheme() } else { - ActivateCustomLightTheme(); + qApp->setStyleSheet(QString()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast) } #endif }