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

Nate Graham <n...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/plasma-pa/commit/52cb6b0 |ma/plasma-pa/commit/b0f7cfc
                   |eecc3092708c207346a13a36e77 |cf80d00d9e76efa05d02bc2fc94
                   |2a6bca                      |b4318d

--- Comment #4 from Nate Graham <n...@kde.org> ---
Git commit b0f7cfccf80d00d9e76efa05d02bc2fc94b4318d by Nate Graham.
Committed on 27/03/2021 at 03:26.
Pushed by ngraham into branch 'Plasma/5.21'.

Round volume to avoid increasing or decreasing by more than stepSize

Sometimes when you increase or decrease the volume using the key on your
keyboard or a global shortcut, it will change by more than the stepSize.
For example when you're at 40% volume and go up when a stepSize of 5%,
sometimes it will change to 46% volume, not 45%.

The reason for this is that the Volume number we get from PulseAudio and
then manipulate is a float. So we have to round it down to avoid
accumulating errors over time. The percentage display function already
rounds, so let's do the same thing in the functions to increase and
decrease the volume.

We should also use Math.floor() rather than Math.round() to ensure
consistency in the values we're using.
FIXED-IN: 5.21.4


(cherry picked from commit 52cb6b0eecc3092708c207346a13a36e772a6bca)

M  +2    -2    applet/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-pa/commit/b0f7cfccf80d00d9e76efa05d02bc2fc94b4318d

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

Reply via email to