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>
pull/55/head
Michele Calgaro 8 months ago
parent 46c271a0c9
commit 3c455c1772
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