qt: improve right-click volume control
commitf317d34c902c68c3192a71aba13752888a27c976
authorRomain Vimont <rom1v@videolabs.io>
Wed, 7 Apr 2021 16:27:04 +0000 (7 18:27 +0200)
committerPierre Lamot <pierre@videolabs.io>
Mon, 12 Apr 2021 08:13:30 +0000 (12 10:13 +0200)
treefa955cf4cdb8678f2267cdffcf1c51938e77ed06
parent7dc299c3a2369fa715532cd1a1469efa7d68d3e5
qt: improve right-click volume control

Right-click allows to set the volume control to predefined steps (0%,
50%, 100% and 125%).

However, the last step (125%) was only reachable from the last pixel.

Instead, set to the nearest predefined value (and simplify the code for
readability).

         0%      50%      100% 125%
         |        |        |    |
         ^^^^^---------^^^^^^^^^-    (before)
         ^^^^^---------^^^^^^^---    (after)

Signed-off-by: Pierre Lamot <pierre@videolabs.io>
modules/gui/qt/player/qml/VolumeWidget.qml