From 3605cc55b7d788491198a2aec4baab70242e6b25 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 13 Jan 2016 00:17:02 +0100 Subject: [PATCH] fix replay progress bar --- cockatrice/src/replay_timeline_widget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/replay_timeline_widget.cpp b/cockatrice/src/replay_timeline_widget.cpp index fb3efc1d..e0776358 100644 --- a/cockatrice/src/replay_timeline_widget.cpp +++ b/cockatrice/src/replay_timeline_widget.cpp @@ -58,7 +58,8 @@ void ReplayTimelineWidget::paintEvent(QPaintEvent * /* event */) painter.fillPath(path, Qt::black); const QColor barColor = QColor::fromHsv(120, 255, 255, 100); - painter.fillRect(0, 0, (width() - 1) * currentTime / maxTime, height() - 1, barColor); + quint64 w = (quint64)(width() - 1) * (quint64) currentTime / maxTime; + painter.fillRect(0, 0, w, height() - 1, barColor); } QSize ReplayTimelineWidget::sizeHint() const