diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-08 13:28:28 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-08 19:33:31 +0900 |
commit | 3d675d8cd6cd328182025f2995219ba93ef7182a (patch) | |
tree | 73d9e986c4405ac3e2279d3276fc816893a8d4fa /kmilo/generic | |
parent | 07a7866b32ceee70e88008b14e739b83185637ac (diff) | |
download | tdeutils-3d675d8cd6cd328182025f2995219ba93ef7182a.tar.gz tdeutils-3d675d8cd6cd328182025f2995219ba93ef7182a.zip |
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 3c455c1772a0cab18f6313ddf407bbde2f2f48b0)
Diffstat (limited to 'kmilo/generic')
-rw-r--r-- | kmilo/generic/generic_monitor.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/kmilo/generic/generic_monitor.cpp b/kmilo/generic/generic_monitor.cpp index 5751037..435b6df 100644 --- a/kmilo/generic/generic_monitor.cpp +++ b/kmilo/generic/generic_monitor.cpp @@ -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); + } } } } |