summaryrefslogtreecommitdiffhomepage
path: root/video/video-widget.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-08-01 11:22:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-08-01 11:22:41 +0200
commitb930dd608bf95ecc3f89007313ba8ab8b1935ee5 (patch)
tree649ddba90caa1de65ad1c53be23afeb635121e73 /video/video-widget.cpp
parente71f7af1d619d02667c2bfb9f5fd0d925e534230 (diff)
video: reuse working dpi check
Diffstat (limited to 'video/video-widget.cpp')
-rw-r--r--video/video-widget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/video-widget.cpp b/video/video-widget.cpp
index 9100e0ea..8262a380 100644
--- a/video/video-widget.cpp
+++ b/video/video-widget.cpp
@@ -11,9 +11,8 @@
void video_widget::init_image_nolock()
{
- double dpr = devicePixelRatioF();
- size_.store({ iround(width() * dpr), iround(height() * dpr) },
- std::memory_order_release);
+ double dpi = screen_dpi();
+ size_.store({ iround(width() * dpi), iround(height() * dpi) }, std::memory_order_release);
}
video_widget::video_widget(QWidget* parent) : QWidget(parent)
@@ -85,3 +84,4 @@ void video_widget::set_fresh(bool x)
{
fresh_.store(x, std::memory_order_release);
}
+