on xenial help sign in
use action
26850f2Andrea Cimitan
qml/Dash/Previews/PreviewMediaToolbar.qml+8−2
@@ -25,6 +25,12 @@ Rectangle {
25 color: Qt.rgba(0, 0, 0, 0.8)
25 color: Qt.rgba(0, 0, 0, 0.8)
26 visible: sharingWidget.active
26 visible: sharingWidget.active
27
27
28+ Action {
29+ id: sharingAction
30+ iconName: "share"
31+ onTriggered: sharingWidget.showPeerPicker()
32+ }
33+
28 AbstractButton {
34 AbstractButton {
29 id: button
35 id: button
30 anchors {
36 anchors {
@@ -34,13 +40,13 @@ Rectangle {
34 }
40 }
35 height: units.gu(4)
41 height: units.gu(4)
36 width: units.gu(4)
42 width: units.gu(4)
37− onClicked: sharingWidget.showPeerPicker()
43+ action: sharingAction
38
44
39 Icon {
45 Icon {
40 anchors.centerIn: parent
46 anchors.centerIn: parent
41 height: units.gu(3)
47 height: units.gu(3)
42 width: units.gu(3)
48 width: units.gu(3)
43− source: "image://theme/share"
49+ source: button.action.iconSource
44 }
50 }
45 }
51 }
46
52