mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
use QWidget Fusion style on Windows 10: enable dark mode
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
e69b6cb4c6
commit
194f918788
1 changed files with 9 additions and 0 deletions
|
@ -35,8 +35,11 @@
|
|||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
#include <QQuickStyle>
|
||||
#include <QStyle>
|
||||
#include <QStyleFactory>
|
||||
#include <QQuickWindow>
|
||||
#include <QSurfaceFormat>
|
||||
#include <QOperatingSystemVersion>
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
|
@ -82,6 +85,12 @@ int main(int argc, char **argv)
|
|||
QQuickStyle::setStyle(style);
|
||||
QQuickStyle::setFallbackStyle(QStringLiteral("Fusion"));
|
||||
|
||||
#if defined Q_OS_WIN
|
||||
if (QOperatingSystemVersion::current().version() < QOperatingSystemVersion::Windows11.version()) {
|
||||
QApplication::setStyle(QStyleFactory::create("Fusion"));
|
||||
}
|
||||
#endif
|
||||
|
||||
OCC::Application app(argc, argv);
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
|
|
Loading…
Reference in a new issue