[Kde-hardware-devel] Review Request 122343: Make sure that brightness up/down actions produce visible changes.

Nikita Skovoroda chalkerx at gmail.com
Sun Feb 1 12:58:43 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122343/
-----------------------------------------------------------

(Updated Feb. 1, 2015, 12:58 p.m.)


Status
------

This change has been marked as submitted.


Review request for Solid and Kai Uwe Broulik.


Repository: powerdevil


Description
-------

Atm when maxBrightness > 100, brightness up/down actions could produce no visible change in some situations.
For example, when maxBrightness = 1000, brightness = 496:
* Brightness is shown as 50% (rounded to whole pecents).
* «Brightness up» action increases the brightness by 1 to 497 and rounds it to the nearest step upwards 500, 50%.
* The above logic is correct for, for example, brightness = 480 (so that it's raised to 500 = 50%, not to 530 = 53%), but in the described situation, when the brightness was manually set to 496 through a slider, the action does no visible change, which is unexpected.
 
This patch solves this issue by comparing the visible percentage of the resulting brightness to the visible percentage of the original brightness and adding/subtracting one more step if there was no visible change.


Diffs
-----

  daemon/powerdevilbrightnesslogic.h d7a02c5 
  daemon/powerdevilbrightnesslogic.cpp 5f61628 

Diff: https://git.reviewboard.kde.org/r/122343/diff/


Testing
-------

Compiles. Trivial, should not break anything.


Thanks,

Nikita Skovoroda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20150201/fd783a6a/attachment.html>


More information about the Kde-hardware-devel mailing list