mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-03 13:30:26 +01:00
Correct time computation for seekbar tooltip.
This commit is contained in:
parent
1535e78aa0
commit
f548884f57
@ -86,8 +86,9 @@ void TrackSliderSlider::mouseMoveEvent(QMouseEvent* e) {
|
|||||||
int slider_max = gr.right() - slider_length + 1;
|
int slider_max = gr.right() - slider_length + 1;
|
||||||
|
|
||||||
mouse_hover_seconds_ = QStyle::sliderValueFromPosition(
|
mouse_hover_seconds_ = QStyle::sliderValueFromPosition(
|
||||||
minimum() / kMsecPerSec, maximum() / kMsecPerSec,
|
minimum(), maximum(),
|
||||||
e->x() - slider_length / 2 - slider_min + 1, slider_max - slider_min);
|
e->x() - slider_length / 2 - slider_min, slider_max - slider_min)
|
||||||
|
/ kMsecPerSec;
|
||||||
|
|
||||||
popup_->SetText(Utilities::PrettyTime(mouse_hover_seconds_));
|
popup_->SetText(Utilities::PrettyTime(mouse_hover_seconds_));
|
||||||
UpdateDeltaTime();
|
UpdateDeltaTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user