Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Set the default qtquick style to fusion when none is set.
Wolthera van Hövell tot Westerflier23442da4e67f
diff --git a/CMakeLists.txt b/CMakeLists.txtindex e01cd31bd7..52ba1fc11e 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -547,9 +547,19 @@ if (Qt5QuickWidgets_FOUND)# This is needed because Qt dependencies aren't added by ECM but by androideployqt,# so it doesn't benefit from our patch in ECM.list (APPEND ANDROID_EXTRA_LIBS $<TARGET_FILE:Qt5::QuickWidgets>)++ find_package(Qt5QuickControls2 ${MIN_QT_VERSION})+ set_package_properties(Qt5QuickControls2 PROPERTIES+ DESCRIPTION "QtQuickControls"+ URL "https://www.qt.io/"+ TYPE OPTIONAL+ PURPOSE "Optionally used for the touch gui for Krita")+endif()++if (NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT HAIKU)find_package(Qt5 ${MIN_QT_VERSION} REQUIRED X11Extras)diff --git a/plugins/dockers/textproperties/CMakeLists.txt b/plugins/dockers/textproperties/CMakeLists.txtindex ef0cb18fc4..cf97009108 100644--- a/plugins/dockers/textproperties/CMakeLists.txt+++ b/plugins/dockers/textproperties/CMakeLists.txt@@ -10,6 +10,7 @@ target_link_libraries(kritatextpropertieskritauiQt5::QuickQt5::QuickWidgets+ Qt5::QuickControls2Qt5::Qml)install(TARGETS kritatextproperties DESTINATION ${KRITA_PLUGIN_INSTALL_DIR})diff --git a/plugins/dockers/textproperties/TextPropertiesDock.cpp b/plugins/dockers/textproperties/TextPropertiesDock.cppindex e7fe25a4e9..72fff135bd 100644--- a/plugins/dockers/textproperties/TextPropertiesDock.cpp+++ b/plugins/dockers/textproperties/TextPropertiesDock.cpp@@ -14,6 +14,7 @@#include <QQuickItem>#include <QFontDatabase>#include <QStringListModel>+#include <QQuickStyle>#include <KisViewManager.h>#include <kis_canvas_resource_provider.h>@@ -60,6 +61,11 @@ TextPropertiesDock::TextPropertiesDock()m_quickWidget->engine()->rootContext()->setContextProperty("mainWindow", this);m_quickWidget->engine()->rootContext()->setContextObject(new KLocalizedContext(this));+ // Default to fusion style unless the user forces another style+ if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {+ QQuickStyle::setStyle(QStringLiteral("Fusion"));+ }+m_quickWidget->engine()->addImportPath(KoResourcePaths::getApplicationRoot() + "/lib/qml/");m_quickWidget->engine()->addImportPath(KoResourcePaths::getApplicationRoot() + "/lib64/qml/");