summarylogtreecommitdiffstats
path: root/fix-qt-theme.patch
blob: fe0510b3f85e2c47e9c9268e588008e118bd5d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 0817e3933cf8a4122cbba944ff5d32a8cdb78f9b Mon Sep 17 00:00:00 2001
From: Mick Sayson <mick@sayson.com>
Date: Fri, 12 Jun 2020 19:52:50 -0700
Subject: [PATCH] Fix default palette application on Qt 5.15.0

---
 src/app/Application.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/app/Application.cpp b/src/app/Application.cpp
index 7a54b89..143dc05 100644
--- a/src/app/Application.cpp
+++ b/src/app/Application.cpp
@@ -27,6 +27,7 @@
 #include <QNetworkReply>
 #include <QOperatingSystemVersion>
 #include <QSettings>
+#include <QStyle>
 #include <QSysInfo>
 #include <QTimer>
 #include <QTranslator>
@@ -187,6 +188,9 @@ Application::Application(int &argc, char **argv, bool haltOnParseError)
   // Enable system proxy auto-detection.
   QNetworkProxyFactory::setUseSystemConfiguration(true);
 
+  // Set default pallete. Pre Qt 5.15.0 this should be the same as the default
+  QApplication::setPalette(QApplication::style()->standardPalette());
+
   // Do platform-specific initialization.
 #if defined(Q_OS_MAC)
   // Register service on Mac.