[vlc-devel] [PATCH] qt: fix double resize of video widget on hidpi screen
Anatolii Aniskovych
lin.aaa.lin at gmail.com
Sat Jun 3 20:11:24 CEST 2017
---
modules/gui/qt/main_interface.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 561e502d7b..bec22ea53c 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -733,8 +733,16 @@ void MainInterface::getVideoSlot( struct vout_window_t *p_wnd,
showVideo();
/* Ask videoWidget to resize correctly, if we are in normal mode */
- if( b_autoresize )
+ if( b_autoresize ) {
+#if HAS_QT56
+ qreal factor = videoWidget->devicePixelRatioF();
+
+ i_width = qRound( (qreal) i_width / factor );
+ i_height = qRound( (qreal) i_height / factor );
+#endif
+
videoWidget->setSize( i_width, i_height );
+ }
}
}
--
2.13.0
More information about the vlc-devel
mailing list