From: Soeren Apel Date: Mon, 22 Oct 2018 21:20:11 +0000 (+0200) Subject: GlobalSettings: Always use Fusion style on Windows for dark themes X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=43be386b1714c50b6e10a382f3bec194b914354f;p=pulseview.git GlobalSettings: Always use Fusion style on Windows for dark themes --- diff --git a/pv/globalsettings.cpp b/pv/globalsettings.cpp index 3f3711b8..af89671c 100644 --- a/pv/globalsettings.cpp +++ b/pv/globalsettings.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include using std::map; using std::pair; @@ -142,6 +144,9 @@ void GlobalSettings::apply_theme() qApp->setPalette(default_palette_); if (theme_name.compare("QDarkStyleSheet") == 0) { +#ifdef Q_OS_WIN + qApp->setStyle(QStyleFactory::create("Fusion")); +#endif QPalette dark_palette; dark_palette.setColor(QPalette::Window, QColor(53, 53, 53)); dark_palette.setColor(QPalette::WindowText, Qt::white); @@ -150,6 +155,9 @@ void GlobalSettings::apply_theme() dark_palette.setColor(QPalette::Highlight, QColor(42, 130, 218)); qApp->setPalette(dark_palette); } else if (theme_name.compare("DarkStyle") == 0) { +#ifdef Q_OS_WIN + qApp->setStyle(QStyleFactory::create("Fusion")); +#endif QPalette dark_palette; dark_palette.setColor(QPalette::Window, QColor(53, 53, 53)); dark_palette.setColor(QPalette::WindowText, Qt::white);