mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
use Fusion qml style
allows use of more standard qml styling and components Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
7d03007fa8
commit
4c1ab7092b
1 changed files with 3 additions and 16 deletions
|
@ -61,13 +61,6 @@ int main(int argc, char **argv)
|
|||
Q_INIT_RESOURCE(resources);
|
||||
Q_INIT_RESOURCE(theme);
|
||||
|
||||
// Work around a bug in KDE's qqc2-desktop-style which breaks
|
||||
// buttons with icons not based on a name, by forcing a style name
|
||||
// the platformtheme plugin won't try to force qqc2-desktops-style
|
||||
// anymore.
|
||||
// Can be removed once the bug in qqc2-desktop-style is gone.
|
||||
QQuickStyle::setStyle("Fusion");
|
||||
|
||||
// OpenSSL 1.1.0: No explicit initialisation or de-initialisation is necessary.
|
||||
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
|
@ -80,6 +73,9 @@ int main(int argc, char **argv)
|
|||
surfaceFormat.setOption(QSurfaceFormat::ResetNotification);
|
||||
QSurfaceFormat::setDefaultFormat(surfaceFormat);
|
||||
|
||||
QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
|
||||
QQuickStyle::setStyle(QStringLiteral("Fusion"));
|
||||
|
||||
OCC::Application app(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
@ -104,15 +100,6 @@ int main(int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
|
||||
#else
|
||||
// See https://bugreports.qt.io/browse/QTBUG-70481
|
||||
if (std::fmod(app.devicePixelRatio(), 1) == 0) {
|
||||
QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
|
||||
}
|
||||
#endif
|
||||
|
||||
// check a environment variable for core dumps
|
||||
#ifdef Q_OS_UNIX
|
||||
if (!qEnvironmentVariableIsEmpty("OWNCLOUD_CORE_DUMP")) {
|
||||
|
|
Loading…
Reference in a new issue