Skip to content

Add volume tooltip as an integer percentage

Jack Hill requested to merge jackh/elisa:volume_tooltip into master

This tooltip shows the volume when a mouse hovers over the slider. The displayed volume is based on the location of the mouse, not the location of the slider handle. So if the handle is set to zero and the mouse is hovered somewhere in the centre of the slider, the tooltip will say "50%".

  1. There's probably a better way of converting numbers to percentages. I imagine my current method doesn't satisfy RTL languages. Not sure though. Should be better now I copied the method used in the Plasma Audio Volume applet.

  2. I couldn't get the tooltip to appear on mobile while hovering (actually on desktop but with QT_QUICK_CONTROLS_MOBILE=1 --- I don't have a Linux phone to test). Clicking and holding on the slider works though (also I'm not if this applies to touch-screens anyway, since I used using a MouseArea for the implementation).

  3. This implementation is based on a tooltip I started working on for the duration slider, hence why the tooltip follows the mouse. Thinking about it again, it might be better to always display the tooltip above the slider. Thoughts on changing this behaviour? Tooltip now follows the handle (at least, it follows where the handle should be (see )

BUG: 467344

Edited by Jack Hill

Merge request reports