diff --git a/shell/contents/components/DialerSvgButton.qml b/shell/contents/components/HomeLauncherSvg.qml similarity index 80% rename from shell/contents/components/DialerSvgButton.qml rename to shell/contents/components/HomeLauncherSvg.qml index b4a778ac..bb9c56cf 100644 --- a/shell/contents/components/DialerSvgButton.qml +++ b/shell/contents/components/HomeLauncherSvg.qml @@ -2,6 +2,7 @@ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore Item { + id: root width: parent.width / parent.columns height: parent.buttonHeight property var callback @@ -19,6 +20,9 @@ Item { MouseArea { anchors.fill: parent + propagateComposedEvents: true + drag.target: stripe + drag.axis: Drag.YAxis onClicked: { if (callback) { callback(); @@ -27,11 +31,9 @@ Item { } } - onPressAndHold: { - if (parent.sub.length > 0) { - addNumber(parent.sub); - } else { - addNumber(parent.text); + onReleased: { + if (drag.active) { + } } } diff --git a/shell/contents/images/homescreenicons.svg b/shell/contents/images/homescreenicons.svg new file mode 100644 index 00000000..e3c4edb3 --- /dev/null +++ b/shell/contents/images/homescreenicons.svg @@ -0,0 +1,260 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/shell/contents/views/Desktop.qml b/shell/contents/views/Desktop.qml index 8876bc74..5804d3bb 100644 --- a/shell/contents/views/Desktop.qml +++ b/shell/contents/views/Desktop.qml @@ -233,13 +233,56 @@ Item { id: stripe z: 1 - MouseArea { + PlasmaCore.Svg { + id: stripeIcons + imagePath: Qt.resolvedUrl("../images/homescreenicons.svg") + } + + Row { anchors.fill: parent - onPressed: { + property int columns: 4 + property alias buttonHeight: stripe.height + + HomeLauncherSvg { + id: phoneIcon + svg: stripeIcons + elementId: "phone" + callback: function() { console.log("Start phone") } } - onReleased: { + HomeLauncherSvg { + id: messagingIcon + svg: stripeIcons + elementId: "messaging" + callback: function() { console.log("Start messaging") } } + + + HomeLauncherSvg { + id: emailIcon + svg: stripeIcons + elementId: "email" + callback: function() { console.log("Start email") } + } + + + HomeLauncherSvg { + id: webIcon + svg: stripeIcons + elementId: "web" + callback: function() { console.log("Start web") } + } + } + } + + Grid { + id: applications + z: 1 + anchors { + top: stripe.bottom + bottom: parent.bottom + left: parent.left + right: parent.right } }