[vlc-commits] [Git][videolan/vlc][master] qt: fix scaling of sort icon in contextual menu

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Apr 9 16:16:57 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
120ce6a3 by Pierre Lamot at 2023-04-09T14:47:04+00:00
qt: fix scaling of sort icon in contextual menu

fix: #27985

- - - - -


1 changed file:

- modules/gui/qt/menus/qml_menu_wrapper.cpp


Changes:

=====================================
modules/gui/qt/menus/qml_menu_wrapper.cpp
=====================================
@@ -49,8 +49,11 @@ namespace
         if (arrowsize <= 0)
             arrowsize = 32;
 
+        qreal dpr = widget ? widget->devicePixelRatioF() : 1.0;
         headerOption.rect = QRect(0, 0, arrowsize, arrowsize);
-        QPixmap arrow(arrowsize, arrowsize);
+
+        QPixmap arrow(arrowsize * dpr, arrowsize * dpr);
+        arrow.setDevicePixelRatio(dpr);
         arrow.fill(Qt::transparent);
 
         {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/120ce6a393099f95e414785bf45b12cd84d67742

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/120ce6a393099f95e414785bf45b12cd84d67742
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list