Commit 2f9db12c authored by Marco Martin's avatar Marco Martin

change brightness only when slider is pressed

call the service to change brightness only when the slider is pressed
parent dfa4059a
......@@ -39,13 +39,6 @@ Item {
property int screenBrightness
readonly property int maximumScreenBrightness: pmSource.data["PowerDevil"] ? pmSource.data["PowerDevil"]["Maximum Screen Brightness"] || 0 : 0
onScreenBrightnessChanged: {
var service = pmSource.serviceForSource("PowerDevil");
var operation = service.operationDescription("setBrightness");
operation.brightness = screenBrightness;
operation.silent = true
service.startOperationCall(operation);
}
PlasmaCore.DataSource {
id: pmSource
......@@ -163,7 +156,11 @@ Item {
value: root.screenBrightness
onValueChanged: {
if (pressed) {
root.screenBrightness = value
var service = pmSource.serviceForSource("PowerDevil");
var operation = service.operationDescription("setBrightness");
operation.brightness = value;
operation.silent = true
service.startOperationCall(operation);
}
}
minimumValue: maximumValue > 100 ? 1 : 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment