kmilo: improve brightness OSD feedback by displaying the actual value. This may differ from the set value on machines with few brightness steps capability

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 3c455c1772)
r14.1.x
Michele Calgaro 1 year ago
parent 07a7866b32
commit 3d675d8cd6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -303,7 +303,18 @@ void GenericMonitor::brightnessChange(int direction, int step)
{
tdepowersave->send("do_brightnessDown", step);
}
_interface->displayProgress(i18n("Brightness"), brightnessLevel);
DCOPReply reply = tdepowersave->call("brightnessGet");
if (reply.isValid())
{
// Display real brightness value. This may differ from the set value
// on machines with few brightness steps.
_interface->displayProgress(i18n("Brightness"), (int)reply);
}
else
{
_interface->displayProgress(i18n("Brightness"), brightnessLevel);
}
}
}
}

Loading…
Cancel
Save