diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-12-14 18:29:55 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-12-14 18:29:55 +0100 |
commit | 7ae98845f05e8d8245635f8bc5f64940d44d06cf (patch) | |
tree | 82afbc55fd9a762db2fcb9cfc02289e13d3ed7ab | |
parent | f3371c1d788f7e6a5da22d24d745736164b330aa (diff) | |
download | rockbox-7ae98845f05e8d8245635f8bc5f64940d44d06cf.tar.gz rockbox-7ae98845f05e8d8245635f8bc5f64940d44d06cf.zip |
rbutil: Change style to Fusion on Windows.
The default UI style has some issues with HiDPI support. Use the Qt
built-in Fusion instead. This looks somewhat different to the native
Windows UI, but works better on HiDPI displays.
Change-Id: I25f1b038047a11da7492dfbfa1425874f070ab0b
-rw-r--r-- | rbutil/rbutilqt/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/main.cpp b/rbutil/rbutilqt/main.cpp index e9a86fd3c3..47c625b54d 100644 --- a/rbutil/rbutilqt/main.cpp +++ b/rbutil/rbutilqt/main.cpp | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <QCoreApplication> | 20 | #include <QCoreApplication> |
21 | #include <QSettings> | 21 | #include <QSettings> |
22 | #include <QStyleFactory> | ||
22 | #include "rbutilqt.h" | 23 | #include "rbutilqt.h" |
23 | #include "systrace.h" | 24 | #include "systrace.h" |
24 | #include "Logger.h" | 25 | #include "Logger.h" |
@@ -43,6 +44,9 @@ int main( int argc, char ** argv ) { | |||
43 | QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); | 44 | QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); |
44 | #endif | 45 | #endif |
45 | QApplication app( argc, argv ); | 46 | QApplication app( argc, argv ); |
47 | #ifdef Q_OS_WIN | ||
48 | qApp->setStyle(QStyleFactory::create("Fusion")); | ||
49 | #endif | ||
46 | ConsoleAppender* consoleAppender = new ConsoleAppender(); | 50 | ConsoleAppender* consoleAppender = new ConsoleAppender(); |
47 | consoleAppender->setFormat("[%{file}:%{line} %{type}] %{message}\n"); | 51 | consoleAppender->setFormat("[%{file}:%{line} %{type}] %{message}\n"); |
48 | cuteLoggerInstance()->registerAppender(consoleAppender); | 52 | cuteLoggerInstance()->registerAppender(consoleAppender); |