on xenial help sign in
Make SwipeToAct a bit more generic and allow passing in symbolic icons.
adf35a5Mirco Müller
qml/Notifications/Notification.qml+2
@@ -438,6 +438,8 @@ Item {
438 SwipeToAct {
438 SwipeToAct {
439 objectName: "notify_button" + index
439 objectName: "notify_button" + index
440
440
441+ leftIconName: "call-end"
442+ rightIconName: "call-start"
441 width: buttonRow.width
443 width: buttonRow.width
442
444
443 onLeftTriggered: {
445 onLeftTriggered: {
qml/Notifications/SwipeToAct.qml+4−2
@@ -11,6 +11,8 @@ Item {
11 signal leftTriggered()
11 signal leftTriggered()
12 signal rightTriggered()
12 signal rightTriggered()
13
13
14+ property string leftIconName
15+ property string rightIconName
14 readonly property double sliderHeight: 6
16 readonly property double sliderHeight: 6
15 readonly property double gap: units.gu(1)
17 readonly property double gap: units.gu(1)
16 readonly property double halfWay: mouseArea.drag.maximumX / 2
18 readonly property double halfWay: mouseArea.drag.maximumX / 2
@@ -137,7 +139,7 @@ Item {
137 anchors.centerIn: parent
139 anchors.centerIn: parent
138 width: units.gu(2)
140 width: units.gu(2)
139 height: units.gu(2)
141 height: units.gu(2)
140− name: "call-end"
142+ name: leftIconName
141 color: "white"
143 color: "white"
142 }
144 }
143 }
145 }
@@ -252,7 +254,7 @@ Item {
252 anchors.centerIn: parent
254 anchors.centerIn: parent
253 width: units.gu(2)
255 width: units.gu(2)
254 height: units.gu(2)
256 height: units.gu(2)
255− name: "call-start"
257+ name: rightIconName
256 color: "white"
258 color: "white"
257 }
259 }
258 }
260 }