From f9b2f19bca7a85b33c3f180ef450db27421d7661 Mon Sep 17 00:00:00 2001 From: tomboylover93 <95257311+tomboylover93@users.noreply.github.com> Date: Sat, 28 Dec 2024 13:15:30 -0300 Subject: [PATCH] wip: make system color change work properly on macOS --- src/qt_gui/main_window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index 42389084b..b5e02534e 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -586,7 +586,7 @@ void MainWindow::CreateConnects() { Config::setMainWindowTheme(static_cast(Theme::System)); bool isSystemDarkMode; -#ifdef __linux__ +#if defined(__linux__) || defined(__APPLE__) const QPalette defaultPalette; const auto text = defaultPalette.color(QPalette::WindowText); const auto window = defaultPalette.color(QPalette::Window); @@ -997,7 +997,7 @@ void MainWindow::SetLastUsedTheme() { case Theme::System: ui->setThemeSystem->setChecked(true); bool isSystemDarkMode; -#ifdef __linux__ +#if defined(__linux__) || defined(__APPLE__) const QPalette defaultPalette; const auto text = defaultPalette.color(QPalette::WindowText); const auto window = defaultPalette.color(QPalette::Window); @@ -1186,7 +1186,7 @@ bool MainWindow::eventFilter(QObject* obj, QEvent* event) { if (ui->setThemeSystem->isChecked()) { bool isSystemDarkMode; -#ifdef __linux__ +#if defined(__linux__) || defined(__APPLE__) const QPalette defaultPalette; const auto text = defaultPalette.color(QPalette::WindowText); const auto window = defaultPalette.color(QPalette::Window);