diff options
Diffstat (limited to 'cv/video-widget.cpp')
-rw-r--r-- | cv/video-widget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp index fd4fe350..d93429cb 100644 --- a/cv/video-widget.cpp +++ b/cv/video-widget.cpp @@ -8,6 +8,7 @@ #include "video-widget.hpp" #include "compat/check-visible.hpp" +#include "compat/math.hpp" #include <cstring> @@ -88,8 +89,8 @@ void cv_video_widget::paintEvent(QPaintEvent*) double dpr = devicePixelRatioF(); - int W = int(QWidget::width() * dpr); - int H = int(QWidget::height() * dpr); + int W = iround(QWidget::width() * dpr); + int H = iround(QWidget::height() * dpr); painter.drawImage(rect(), texture); |