[indicator] Set QQC2 style
The indicator can show the KCM, which uses QML now Make sure we have the right style set on all platforms
This commit is contained in:
parent
ab8c189ff4
commit
3ce4cee203
2 changed files with 7 additions and 1 deletions
|
@ -43,7 +43,7 @@ ecm_qt_declare_logging_category(kdeconnect-indicator
|
|||
|
||||
target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/systray_actions)
|
||||
|
||||
target_link_libraries(kdeconnect-indicator Qt::Widgets KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::KCMUtils KF6::Crash kdeconnectinterfaces kdeconnectcore kdeconnectversion)
|
||||
target_link_libraries(kdeconnect-indicator Qt::Widgets Qt::QuickControls2 KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::KCMUtils KF6::Crash kdeconnectinterfaces kdeconnectcore kdeconnectversion)
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(kdeconnect-indicator windowsapp)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <QApplication>
|
||||
#include <QPointer>
|
||||
#include <QProcess>
|
||||
#include <QQuickStyle>
|
||||
#include <QThread>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
@ -68,6 +69,11 @@ int main(int argc, char **argv)
|
|||
QApplication::setStyle(QStringLiteral("breeze"));
|
||||
#endif
|
||||
|
||||
// Default to org.kde.desktop style unless the user forces another style
|
||||
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
|
||||
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
|
||||
}
|
||||
|
||||
KDBusService dbusService(KDBusService::Unique);
|
||||
|
||||
// Trigger loading the KIconLoader plugin
|
||||
|
|
Loading…
Reference in a new issue