Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
fea49c45 by Fatih Uzunoglu at 2024-06-02T16:58:49+00:00
qml: use `paintedWidth` and `paintedHeight` in DoubleShadow

Unless clipping is enabled, `paintedWidth` and `paintedHeight`
provide more information on the actual region that the source
item rendered content.

These properties are provided in `QQuickImage`. However, it is
not necessary that the type is `QQuickImage`. We should respect
each type that provides such information.

- - - - -


1 changed file:

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


Changes:

=====================================
modules/gui/qt/widgets/qml/DoubleShadow.qml
=====================================
@@ -32,8 +32,8 @@ ScaledImage {
     property real viewportWidth: rectWidth + 
(Math.max(Math.abs(primaryHorizontalOffset) + primaryBlurRadius, 
Math.abs(secondaryHorizontalOffset) + secondaryBlurRadius)) * 2
     property real viewportHeight: rectHeight + 
(Math.max(Math.abs(primaryVerticalOffset) + primaryBlurRadius, 
Math.abs(secondaryVerticalOffset) + secondaryBlurRadius)) * 2
 
-    property real rectWidth: sourceItem?.width ?? 0
-    property real rectHeight: sourceItem?.height ?? 0
+    property real rectWidth: sourceItem ? Math.min(sourceItem.paintedWidth ?? 
Number.MAX_VALUE, sourceItem.width) : 0
+    property real rectHeight: sourceItem ? Math.min(sourceItem.paintedHeight 
?? Number.MAX_VALUE, sourceItem.height) : 0
     property real xRadius: sourceItem?.radius ?? 0
     property real yRadius: sourceItem?.radius ?? 0
 



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

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/fea49c4504c83581d4c8f38cd3e02d81c7750618
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to