summaryrefslogtreecommitdiffhomepage
path: root/video
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2020-02-03 22:24:33 +0100
committerStanislaw Halik <sthalik@misaki.pl>2020-02-03 22:24:33 +0100
commit25dd60c84f686e9e2239f70e67fd8dcd82c1b268 (patch)
tree76fcd7c67bb5f4836e3760646226ff6061134a1a /video
parentf9c56da355b061fa4eb330ec7352a2f41186fc18 (diff)
video/widget: fix hidpi scaling on linux
Diffstat (limited to 'video')
-rw-r--r--video/video-widget.cpp2
-rw-r--r--video/video-widget.hpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/video/video-widget.cpp b/video/video-widget.cpp
index 8262a380..4399b11a 100644
--- a/video/video-widget.cpp
+++ b/video/video-widget.cpp
@@ -11,7 +11,7 @@
void video_widget::init_image_nolock()
{
- double dpi = screen_dpi();
+ double dpi = devicePixelRatioF();
size_.store({ iround(width() * dpi), iround(height() * dpi) }, std::memory_order_release);
}
diff --git a/video/video-widget.hpp b/video/video-widget.hpp
index 9218643b..bb218c69 100644
--- a/video/video-widget.hpp
+++ b/video/video-widget.hpp
@@ -7,7 +7,6 @@
#pragma once
-#include "compat/qt-dpi.hpp"
#include "compat/math.hpp"
#include "export.hpp"
@@ -21,7 +20,7 @@
#include <QMutex>
-struct OTR_VIDEO_EXPORT video_widget : QWidget, public screen_dpi_mixin<video_widget>
+struct OTR_VIDEO_EXPORT video_widget : QWidget
{
video_widget(QWidget* parent = nullptr);