Commit e58d91a5 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Force using org.kde.desktop style on non-Android

On Plasma this is done via plasma-integration, but on non-Plasma systems
we get the default QML style that is severly broken.

Set the style to org.kde.desktop but allow to override it via env var so
we can get org.kde.breeze on Plasma Mobile.

Also mark it as a dependency in CMake
parent ab8a3a12
......@@ -87,7 +87,7 @@ if (ANDROID)
find_package(Gradle REQUIRED)
else()
find_package(Qt5 REQUIRED COMPONENTS Widgets DBus)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DBusAddons)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DBusAddons QQC2DesktopStyle)
find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS Solid Crash)
endif()
if (TARGET KF5::Crash)
......
......@@ -205,6 +205,10 @@ int main(int argc, char **argv)
QQuickStyle::setStyle(QStringLiteral("Material"));
#else
QApplication app(argc, argv); // for native file dialogs
// Default to org.kde.desktop style unless the user forces another style
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
}
#endif
QGuiApplication::setApplicationDisplayName(i18n("KDE Itinerary"));
QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("itinerary")));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment