summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/wireshark_application.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index 93fb1ec675..8414cb4502 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -833,6 +833,10 @@ WiresharkApplication::WiresharkApplication(int &argc, char **argv) :
#endif
qApp->setStyleSheet(app_style_sheet);
+ // If our window text is lighter than the window background, assume the theme is dark.
+ QPalette gui_pal = QGuiApplication::palette();
+ prefs_set_gui_theme_is_dark(gui_pal.windowText().color().value() > gui_pal.window().color().value());
+
#ifdef HAVE_SOFTWARE_UPDATE
connect(this, SIGNAL(softwareUpdateQuit()), this, SLOT(quit()), Qt::QueuedConnection);
#endif