on xenial help sign in
pass indicators down from Shell
d1c8152Lukáš Tinkl
qml/Components/VolumeControl.qml+8−5
@@ -26,6 +26,8 @@ Item {
26 readonly property int stepUp: 1
26 readonly property int stepUp: 1
27 readonly property int stepDown: -1
27 readonly property int stepDown: -1
28
28
29+ property var indicators // passed from Shell.qml
30+
29 QDBusActionGroup {
31 QDBusActionGroup {
30 id: actionGroup
32 id: actionGroup
31 busType: 1
33 busType: 1
@@ -45,12 +47,13 @@ Item {
45 }
47 }
46
48
47 Connections {
49 Connections {
48− target: panel.indicators
50+ target: indicators
49 onFullyOpenedChanged: { // disallow the volume notification when using the slider
51 onFullyOpenedChanged: { // disallow the volume notification when using the slider
50− if (target.fullyOpened)
52+ if (indicators.fullyOpened) {
51− actionGroup.indicatorsAction.updateState(true)
53+ actionGroup.indicatorsAction.updateState(true);
52− else
54+ } else {
53− actionGroup.indicatorsAction.updateState(false)
55+ actionGroup.indicatorsAction.updateState(false);
56+ }
54 }
57 }
55 }
58 }
56
59
qml/Shell.qml+1
@@ -169,6 +169,7 @@ Item {
169
169
170 VolumeControl {
170 VolumeControl {
171 id: volumeControl
171 id: volumeControl
172+ indicators: panel.indicators
172 }
173 }
173
174
174 DashCommunicator {
175 DashCommunicator {