on xenial help sign in
pass indicators down from Shell

coding style fixes

commitd1c8152528e7a77d0b988082d79e9719b361eb7a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 20 Aug 2015, 14:38 (11 years ago) parenta0f1cb9
2 files changed+9−5
qml/Components/VolumeControl.qml+8−5 qml/Shell.qml+1
qml/Components/VolumeControl.qml+8−5
@@ -26,6 +26,8 @@ Item {
2626 readonly property int stepUp: 1
2727 readonly property int stepDown: -1
2828
29+ property var indicators // passed from Shell.qml
30+
2931 QDBusActionGroup {
3032 id: actionGroup
3133 busType: 1
@@ -45,12 +47,13 @@ Item {
4547 }
4648
4749 Connections {
48− target: panel.indicators
50+ target: indicators
4951 onFullyOpenedChanged: { // disallow the volume notification when using the slider
50− if (target.fullyOpened)
51− actionGroup.indicatorsAction.updateState(true)
52− else
53− actionGroup.indicatorsAction.updateState(false)
52+ if (indicators.fullyOpened) {
53+ actionGroup.indicatorsAction.updateState(true);
54+ } else {
55+ actionGroup.indicatorsAction.updateState(false);
56+ }
5457 }
5558 }
5659
qml/Shell.qml+1
@@ -169,6 +169,7 @@ Item {
169169
170170 VolumeControl {
171171 id: volumeControl
172+ indicators: panel.indicators
172173 }
173174
174175 DashCommunicator {