From 285f9920e47d3864c387610bce0c36bab4ba8924 Mon Sep 17 00:00:00 2001 From: Adrien Bertrand Date: Wed, 17 Jan 2024 10:12:49 +0100 Subject: [PATCH] dark mode test without mac thing --- gui/qt/utils.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/gui/qt/utils.cpp b/gui/qt/utils.cpp index 2bbfb3705..d334d3436 100644 --- a/gui/qt/utils.cpp +++ b/gui/qt/utils.cpp @@ -94,25 +94,9 @@ bool isSystemInDarkMode() { #if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) isDarkMode = qApp->styleHints()->colorScheme() == Qt::ColorScheme::Dark; - -#elif defined(Q_OS_MACX) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14 - { - std::array buffer; - std::string result; - std::unique_ptr pipe(popen("defaults read -g AppleInterfaceStyle", "r"), pclose); - while (pipe && fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) { - result += buffer.data(); - } - if (result.back() == '\n') { - result.pop_back(); - } - isDarkMode = (result == "Dark"); - } - #else // TODO: handle other OS' way to know if we're running in dark mode isDarkMode = isRunningInDarkMode(); - #endif return isDarkMode;