on xenial help sign in
Make SwipeToAct a bit more generic and allow passing in symbolic icons.
commitadf35a57d3cddb8747d51f516ae54361f2790ddf authorMirco Müller <mirco.mueller@canonical.com> dateMon 20 Oct 2014, 16:29 (12 years ago) parentefac0c0
2 files changed+6−2
qml/Notifications/Notification.qml+2 qml/Notifications/SwipeToAct.qml+4−2
qml/Notifications/Notification.qml+2
@@ -438,6 +438,8 @@ Item {
438438 SwipeToAct {
439439 objectName: "notify_button" + index
440440
441+ leftIconName: "call-end"
442+ rightIconName: "call-start"
441443 width: buttonRow.width
442444
443445 onLeftTriggered: {
qml/Notifications/SwipeToAct.qml+4−2
@@ -11,6 +11,8 @@ Item {
1111 signal leftTriggered()
1212 signal rightTriggered()
1313
14+ property string leftIconName
15+ property string rightIconName
1416 readonly property double sliderHeight: 6
1517 readonly property double gap: units.gu(1)
1618 readonly property double halfWay: mouseArea.drag.maximumX / 2
@@ -137,7 +139,7 @@ Item {
137139 anchors.centerIn: parent
138140 width: units.gu(2)
139141 height: units.gu(2)
140− name: "call-end"
142+ name: leftIconName
141143 color: "white"
142144 }
143145 }
@@ -252,7 +254,7 @@ Item {
252254 anchors.centerIn: parent
253255 width: units.gu(2)
254256 height: units.gu(2)
255− name: "call-start"
257+ name: rightIconName
256258 color: "white"
257259 }
258260 }