geigi / cozy

🎧 Listen to audio books 📚 on Linux
https://cozy.sh
GNU General Public License v3.0
1.09k stars 84 forks source link

show time at mouse position when hovering over the seek bar #768

Open eMBee opened 1 year ago

eMBee commented 1 year ago

to make it easier to jump to a particular point in time in a chapter, the seek bar should show the time at the position of the bar when the mouse hovers over it.

this ugly little patch seems to do the trick for now:

https://gitlab.com/eMBee/cozy/-/commit/347aa154725def86bf25c2b53e15570b12bdbb56

it's ugly, because the position of the mouse is given relative to the box with the slider and not just the bare slider itself. there are hardcoded values to account for the space to the left and right of the slider, as i could not figure out where the size of these spaces is coming from, also the positioning is not acurate, or at least not consistent with the time that is set when actually clicking the location.