https://bugs.kde.org/show_bug.cgi?id=432331

--- Comment #17 from Bernhard <micraf...@gmail.com> ---
Okay I fixed it.
Basically the only thing that's missing is explicit (and actually correct)
rounding in the last line of the function:

Instead of this
batterymonitor.screenBrightness = Math.max(minimumBrightness,
Math.min(maximumBrightness, batterymonitor.screenBrightness + deltaSteps *
steps));

I should be this
batterymonitor.screenBrightness = Math.max(minimumBrightness,
Math.min(maximumBrightness, batterymonitor.screenBrightness +
Math.round(deltaSteps * steps)));

What the patch is trying to do (storing the rounding error for future events)
would be the correct thing to do, but the way that it's done makes it worse
than just this simple fix.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to