Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
eb06aa44 by Fatih Uzunoglu at 2022-08-04T10:00:48+00:00
qml: add option to ScaledImage for integer upscaling

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/ScaledImage.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/ScaledImage.qml
=====================================
@@ -21,8 +21,23 @@
 import QtQuick 2.11
 
 import org.videolan.vlc 0.1
+import org.videolan.compat 0.1
 
 Image {
+    id: root
     sourceSize: Qt.size(width * MainCtx.screen.devicePixelRatio
                     , height * MainCtx.screen.devicePixelRatio)
+
+    property bool disableSmoothWhenIntegerUpscaling: false
+
+    // TODO: Remove this Qt >= 5.14 (Binding.restoreMode == 
Binding.RestoreBindingOrValue)
+    // Only required for the Binding to restore the value back
+    readonly property bool _smooth: true
+    smooth: _smooth
+
+    BindingCompat on smooth {
+        when: root.disableSmoothWhenIntegerUpscaling &&
+              !((root.paintedWidth % root.implicitWidth) || 
(root.paintedHeight % root.implicitHeight))
+        value: false
+    }
 }



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

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


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to