summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/Services
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Services')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml13
1 files changed, 10 insertions, 3 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml
index 87c7c05b..8318df50 100644
--- a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml
+++ b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml
@@ -23,14 +23,21 @@ Singleton {
23 return val; 23 return val;
24 } 24 }
25 25
26 Component.onCompleted: root.currBrightness = root.calcCurrBrightness()
27 Connections { 26 Connections {
28 target: currFile 27 target: currFile
29 function onLoaded() { root.currBrightness = root.calcCurrBrightness(); } 28 function onLoaded() {
29 const b = root.calcCurrBrightness();
30 if (typeof b !== 'undefined')
31 root.currBrightness = b;
32 }
30 } 33 }
31 Connections { 34 Connections {
32 target: maxFile 35 target: maxFile
33 function onLoaded() { root.currBrightness = root.calcCurrBrightness(); } 36 function onLoaded() {
37 const b = root.calcCurrBrightness();
38 if (typeof b !== 'undefined')
39 root.currBrightness = b;
40 }
34 } 41 }
35 42
36 onCurrBrightnessChanged: { 43 onCurrBrightnessChanged: {