[vlc-commits] [Git][videolan/vlc][master] qml: delay fade animation until the sizes are ready in FadingEdge

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Mon Feb 19 18:29:37 UTC 2024



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
f436f96a by Fatih Uzunoglu at 2024-02-19T17:51:23+00:00
qml: delay fade animation until the sizes are ready in FadingEdge

- - - - -


1 changed file:

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


Changes:

=====================================
modules/gui/qt/widgets/qml/FadingEdge.qml
=====================================
@@ -112,6 +112,22 @@ Item {
             property real endFadeSize: root.enableEndFade ? normalFadeSize : 0
             readonly property real endFadePos: 1.0 - endFadeSize
 
+            onBeginningFadeSizeChanged: {
+                if (!beginningFadeBehavior.enabled) {
+                    Qt.callLater(() => {
+                        beginningFadeBehavior.enabled = true
+                    })
+                }
+            }
+
+            onEndFadeSizeChanged: {
+                if (!endFadeBehavior.enabled) {
+                    Qt.callLater(() => {
+                        endFadeBehavior.enabled = true
+                    })
+                }
+            }
+
             Component.onCompleted: {
                 console.assert(shaderEffectSource.shaderEffect === null)
                 shaderEffectSource.shaderEffect = this
@@ -124,6 +140,10 @@ Item {
 
             // TODO: Qt >= 5.15 use inline component
             Behavior on beginningFadeSize {
+                id: beginningFadeBehavior
+
+                enabled: false
+
                 // Qt Bug: UniformAnimator does not work...
                 NumberAnimation {
                     duration: VLCStyle.duration_veryShort
@@ -132,6 +152,10 @@ Item {
             }
 
             Behavior on endFadeSize {
+                id: endFadeBehavior
+
+                enabled: false
+
                 // Qt Bug: UniformAnimator does not work...
                 NumberAnimation {
                     duration: VLCStyle.duration_veryShort



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f436f96a8a72d9af9bcbfa77fbd7a383233962c0
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