qt: make seek tooltip + actual seek less surprising

Multimedia / VLC - Filip Roséen [videolabs.io] - 22 March 2016 13:30 UTC

Previously seeking could be somewhat of a surprise if one relied on the text present in the tooltip above the SeekSlider when hovering it with your mouse.

Since the position of where we are going to end up was calculated differently in different parts of the code, you could aim for "00:10:42" but end up quite far from there (how far depends on the length of the media you are playing).

This patch fixes the above by introducing two helper functions, effectively making all calculations that are based on the X-coordinate relative to the SeekSlider the same, and as such less surprising.

e46945c qt: make seek tooltip + actual seek less surprising
modules/gui/qt/util/input_slider.cpp | 21 ++++++++++++++++++---
modules/gui/qt/util/input_slider.hpp | 3 +++
2 files changed, 21 insertions(+), 3 deletions(-)

Upstream: git.videolan.org


  • Share