mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
set the windows native qml style on windows systems
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
d8185e69c8
commit
690ebccbe3
1 changed files with 5 additions and 14 deletions
|
@ -73,25 +73,16 @@ int main(int argc, char **argv)
|
|||
|
||||
auto style = QStringLiteral("Fusion");
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#if defined Q_OS_MAC
|
||||
style = QStringLiteral("macOS");
|
||||
#elif defined Q_OS_WIN
|
||||
style = QStringLiteral("Windows");
|
||||
#endif
|
||||
|
||||
OCC::Application app(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// The Windows style still has pixelated elements with Qt 5.6,
|
||||
// it's recommended to use the Fusion style in this case, even
|
||||
// though it looks slightly less native. Check here after the
|
||||
// QApplication was constructed, but before any QWidget is
|
||||
// constructed.
|
||||
if (app.devicePixelRatio() > 1) {
|
||||
style = "Windows";
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
QQuickStyle::setStyle(style);
|
||||
|
||||
OCC::Application app(argc, argv);
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue