Correct time computation for seekbar tooltip.

This commit is contained in:
Daniel Perelman 2021-09-06 19:57:40 -07:00
parent 1535e78aa0
commit 2c3422014f
1 changed files with 3 additions and 2 deletions

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();