1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-22 07:54:18 +01:00

Correct time computation for seekbar tooltip.

This commit is contained in:
Daniel Perelman 2021-09-06 19:57:40 -07:00 committed by John Maguire
parent 1535e78aa0
commit f548884f57

View File

@ -86,8 +86,9 @@ void TrackSliderSlider::mouseMoveEvent(QMouseEvent* e) {
int slider_max = gr.right() - slider_length + 1;
mouse_hover_seconds_ = QStyle::sliderValueFromPosition(
minimum() / kMsecPerSec, maximum() / kMsecPerSec,
e->x() - slider_length / 2 - slider_min + 1, slider_max - slider_min);
minimum(), maximum(),
e->x() - slider_length / 2 - slider_min, slider_max - slider_min)
/ kMsecPerSec;
popup_->SetText(Utilities::PrettyTime(mouse_hover_seconds_));
UpdateDeltaTime();