diff --git a/CMakeLists.txt b/CMakeLists.txt index 11264ca69..c1c5c15f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,7 @@ include(WriteBasicConfigVersionFile) include(Definitions.cmake) +add_subdirectory(declarativeimports) add_subdirectory(liblatte2) add_subdirectory(kwin_scripts) add_subdirectory(app) diff --git a/containment/package/contents/ui/applet/ShortcutBadge.qml b/containment/package/contents/ui/applet/ShortcutBadge.qml index 46833066e..60a29fc76 100644 --- a/containment/package/contents/ui/applet/ShortcutBadge.qml +++ b/containment/package/contents/ui/applet/ShortcutBadge.qml @@ -21,6 +21,7 @@ import QtQuick 2.1 import QtGraphicalEffects 1.0 import org.kde.latte 0.2 as Latte +import org.kde.latte.components 1.0 as LatteComponents Loader{ id: appletNumberLoader @@ -94,7 +95,7 @@ Loader{ } } - Latte.BadgeText { + LatteComponents.BadgeText { id: appletNumber anchors.centerIn: parent diff --git a/containment/package/contents/ui/editmode/Visual.qml b/containment/package/contents/ui/editmode/Visual.qml index ffad6dbb4..00003bf2c 100644 --- a/containment/package/contents/ui/editmode/Visual.qml +++ b/containment/package/contents/ui/editmode/Visual.qml @@ -25,6 +25,7 @@ import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte 0.2 as Latte +import org.kde.latte.components 1.0 as LatteComponents import "../applet" as Applet @@ -56,7 +57,7 @@ Item{ readonly property real appliedOpacity: imageTiler.opacity readonly property real maxOpacity: root.inConfigureAppletsMode ? 1 : plasmoid.configuration.editBackgroundOpacity - Latte.ExternalShadow{ + LatteComponents.ExternalShadow{ id: editExternalShadow width: root.isHorizontal ? imageTiler.width : root.editShadow height: root.isHorizontal ? root.editShadow : imageTiler.height diff --git a/declarativeimports/CMakeLists.txt b/declarativeimports/CMakeLists.txt new file mode 100644 index 000000000..6f5494122 --- /dev/null +++ b/declarativeimports/CMakeLists.txt @@ -0,0 +1,2 @@ +install(DIRECTORY components/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/components) + diff --git a/liblatte2/qml/BadgeText.qml b/declarativeimports/components/BadgeText.qml similarity index 100% rename from liblatte2/qml/BadgeText.qml rename to declarativeimports/components/BadgeText.qml diff --git a/liblatte2/qml/ExternalShadow.qml b/declarativeimports/components/ExternalShadow.qml similarity index 100% rename from liblatte2/qml/ExternalShadow.qml rename to declarativeimports/components/ExternalShadow.qml diff --git a/liblatte2/qml/GlowPoint.qml b/declarativeimports/components/GlowPoint.qml similarity index 100% rename from liblatte2/qml/GlowPoint.qml rename to declarativeimports/components/GlowPoint.qml diff --git a/declarativeimports/components/qmldir b/declarativeimports/components/qmldir new file mode 100644 index 000000000..c41f3dae5 --- /dev/null +++ b/declarativeimports/components/qmldir @@ -0,0 +1,5 @@ +module org.kde.latte.components + +BadgeText 1.0 BadgeText.qml +ExternalShadow 1.0 ExternalShadow.qml +GlowPoint 1.0 GlowPoint.qml diff --git a/liblatte2/qml/indicators/LatteIndicator.qml b/liblatte2/qml/indicators/LatteIndicator.qml index 005f181f6..4ff6a9c79 100644 --- a/liblatte2/qml/indicators/LatteIndicator.qml +++ b/liblatte2/qml/indicators/LatteIndicator.qml @@ -27,6 +27,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.latte 0.2 as Latte +import org.kde.latte.components 1.0 as LatteComponents import "../code/ColorizerTools.js" as ColorizerTools @@ -86,7 +87,7 @@ Item{ id: flowItem flow: plasmoid.formFactor === PlasmaCore.Types.Vertical ? Flow.TopToBottom : Flow.LeftToRight - Latte.GlowPoint{ + LatteComponents.GlowPoint{ id:firstPoint opacity: { if (options.isTask) { @@ -210,7 +211,7 @@ Item{ height: secondPoint.visible ? 0.5*indicatorRoot.size : 0 } - Latte.GlowPoint{ + LatteComponents.GlowPoint{ id:secondPoint width: visible ? indicatorRoot.size : 0 height: width diff --git a/liblatte2/qmldir b/liblatte2/qmldir index 511d745a1..edf32df61 100644 --- a/liblatte2/qmldir +++ b/liblatte2/qmldir @@ -1,9 +1,6 @@ module org.kde.latte plugin latte2plugin -GlowPoint 0.2 GlowPoint.qml -BadgeText 0.2 BadgeText.qml -ExternalShadow 0.2 ExternalShadow.qml LatteIndicator 0.2 indicators/LatteIndicator.qml PlasmaIndicator 0.2 indicators/PlasmaIndicator.qml UnityIndicator 0.2 indicators/UnityIndicator.qml diff --git a/plasmoid/package/contents/ui/task/ProgressOverlay.qml b/plasmoid/package/contents/ui/task/ProgressOverlay.qml index 15ac3b0dd..946711fca 100644 --- a/plasmoid/package/contents/ui/task/ProgressOverlay.qml +++ b/plasmoid/package/contents/ui/task/ProgressOverlay.qml @@ -23,6 +23,7 @@ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte 0.2 as Latte +import org.kde.latte.components 1.0 as LatteComponents Item { id: background @@ -55,7 +56,7 @@ Item { } ] - Latte.BadgeText { + LatteComponents.BadgeText { id: progressCircle anchors.centerIn: parent border.color: root.minimizedDotColor diff --git a/plasmoid/package/contents/ui/task/ShortcutBadge.qml b/plasmoid/package/contents/ui/task/ShortcutBadge.qml index add3000a5..8a0e84824 100644 --- a/plasmoid/package/contents/ui/task/ShortcutBadge.qml +++ b/plasmoid/package/contents/ui/task/ShortcutBadge.qml @@ -21,6 +21,7 @@ import QtQuick 2.7 import QtGraphicalEffects 1.0 import org.kde.latte 0.2 as Latte +import org.kde.latte.components 1.0 as LatteComponents Loader{ id: shorcutBadge @@ -55,7 +56,7 @@ Loader{ } } - Latte.BadgeText { + LatteComponents.BadgeText { id: taskNumber anchors.centerIn: parent minimumWidth: 0.4 * (wrapper.mScale * root.iconSize) diff --git a/shell/package/contents/controls/InnerShadow.qml b/shell/package/contents/controls/InnerShadow.qml index 7d35fa562..47ee98d62 100644 --- a/shell/package/contents/controls/InnerShadow.qml +++ b/shell/package/contents/controls/InnerShadow.qml @@ -23,8 +23,10 @@ import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.latte 0.2 as Latte +import org.kde.latte.components 1.0 as LatteComponents -Latte.ExternalShadow{ + +LatteComponents.ExternalShadow{ id: editExternalShadow states: [