[vlc-commits] [Git][videolan/vlc][master] 12 commits: qml: use `OpacityAnimator` instead of `NumberAnimation` in `MediaView`

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Mar 17 03:12:53 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
88746ace by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `MediaView`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
0dffd6c1 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `FadingEdge`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
a59f9e05 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `FadeControllerStateGroup`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
d7c6568d by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `ModalDialog`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
9241df22 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `MusicAlbums`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
bc0326f0 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `MusicArtist`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
f5cc2b6b by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `PlaylistMediaList`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
575447f1 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `TracksMenu`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
69176738 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `EditorDNDView`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
5eb4ccd3 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `Bookmarks`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
5825bdf2 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `VideoGridDisplay`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -
bc99c678 by Fatih Uzunoglu at 2026-03-17T02:44:58+00:00
qml: use `OpacityAnimator` instead of `NumberAnimation` in `VideoInfoExpandPanel`

`OpacityAnimator` is beneficial with the threaded render loop, since
the opacity is only updated when the animation completes and the QML
engine does not need to bother updating the property constantly which
essentially makes the gui thread to not spend time on that.

- - - - -


12 changed files:

- modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml
- modules/gui/qt/dialogs/toolbar/qml/EditorDNDView.qml
- modules/gui/qt/medialibrary/qml/MediaView.qml
- modules/gui/qt/medialibrary/qml/MusicAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicArtist.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
- modules/gui/qt/medialibrary/qml/VideoGridDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
- modules/gui/qt/player/qml/Bookmarks.qml
- modules/gui/qt/player/qml/TracksMenu.qml
- modules/gui/qt/util/qml/FadeControllerStateGroup.qml
- modules/gui/qt/widgets/qml/FadingEdge.qml


Changes:

=====================================
modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml
=====================================
@@ -90,9 +90,9 @@ Dialog {
     }
 
     exit: Transition {
-        NumberAnimation { property: "opacity"; from: 1.0; to: 0.0 }
+        OpacityAnimator { from: 1.0; to: 0.0 }
     }
     enter: Transition {
-        NumberAnimation { property: "opacity"; from: 0.0; to: 1.0 }
+        OpacityAnimator { from: 0.0; to: 1.0 }
     }
 }


=====================================
modules/gui/qt/dialogs/toolbar/qml/EditorDNDView.qml
=====================================
@@ -46,8 +46,9 @@ ListView {
     }
 
     remove: Transition {
-        NumberAnimation {
-            property: "opacity"; from: 1.0; to: 0
+        OpacityAnimator {
+            from: 1.0
+            to: 0.0
 
             duration: VLCStyle.duration_long
         }


=====================================
modules/gui/qt/medialibrary/qml/MediaView.qml
=====================================
@@ -215,7 +215,7 @@ MainViewLoader {
                 }
 
                 Behavior on opacity {
-                    NumberAnimation {
+                    OpacityAnimator {
                         duration: VLCStyle.duration_short
                     }
                 }


=====================================
modules/gui/qt/medialibrary/qml/MusicAlbums.qml
=====================================
@@ -139,7 +139,7 @@ MainViewLoader {
                 }
 
                 Behavior on opacity {
-                    NumberAnimation {
+                    OpacityAnimator {
                         duration: VLCStyle.duration_short
                     }
                 }


=====================================
modules/gui/qt/medialibrary/qml/MusicArtist.qml
=====================================
@@ -561,7 +561,7 @@ FocusScope {
                 }
 
                 Behavior on opacity {
-                    NumberAnimation {
+                    OpacityAnimator {
                         duration: VLCStyle.duration_short
                     }
                 }


=====================================
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
=====================================
@@ -350,7 +350,11 @@ MainViewLoader {
                 //---------------------------------------------------------------------------------
                 // Animations
 
-                Behavior on opacity { NumberAnimation { duration: VLCStyle.duration_short } }
+                Behavior on opacity {
+                    OpacityAnimator {
+                        duration: VLCStyle.duration_short
+                    }
+                }
 
                 DropArea {
                     anchors.fill: parent


=====================================
modules/gui/qt/medialibrary/qml/VideoGridDisplay.qml
=====================================
@@ -127,7 +127,11 @@ Widgets.ExpandGridItemView {
 
         // Animations
 
-        Behavior on opacity { NumberAnimation { duration: VLCStyle.duration_short } }
+        Behavior on opacity {
+            OpacityAnimator {
+                duration: VLCStyle.duration_short
+            }
+        }
     }
 
     expandDelegate: VideoInfoExpandPanel {


=====================================
modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
=====================================
@@ -260,7 +260,7 @@ FocusScope {
                     opacity: visible ? 1.0 : 0.0
 
                     Behavior on opacity {
-                        NumberAnimation {
+                        OpacityAnimator {
                             duration: VLCStyle.duration_long
                         }
                     }


=====================================
modules/gui/qt/player/qml/Bookmarks.qml
=====================================
@@ -56,9 +56,9 @@ Item {
         Transition {
             to: "hidden"
             SequentialAnimation {
-                NumberAnimation{
+                OpacityAnimator {
                     target: control
-                    properties: "opacity"
+                    from: 1.0 // QTBUG-66475
                     to: 0
                     duration: VLCStyle.duration_short; easing.type: Easing.OutSine
                 }
@@ -69,9 +69,9 @@ Item {
             to: "visible"
             SequentialAnimation {
                 PropertyAction { target: control; property: "visible"; value: true; }
-                NumberAnimation{
+                OpacityAnimator {
                     target: control
-                    properties: "opacity"
+                    from: 0.0 // QTBUG-66475
                     to: 1
                     duration: VLCStyle.duration_short; easing.type: Easing.InSine
                 }


=====================================
modules/gui/qt/player/qml/TracksMenu.qml
=====================================
@@ -89,32 +89,28 @@ T.Popup {
         }
 
         pushEnter: Transition {
-            PropertyAnimation {
-                property: "opacity"
+            OpacityAnimator {
                 from: 0
                 to: 1
                 duration: VLCStyle.duration_long
             }
         }
         pushExit: Transition {
-            PropertyAnimation {
-                property: "opacity"
+            OpacityAnimator {
                 from: 1
                 to: 0
                 duration: VLCStyle.duration_long
             }
         }
         popEnter: Transition {
-            PropertyAnimation {
-                property: "opacity"
+            OpacityAnimator {
                 from: 0
                 to: 1
                 duration: VLCStyle.duration_long
             }
         }
         popExit: Transition {
-            PropertyAnimation {
-                property: "opacity"
+            OpacityAnimator {
                 from: 1
                 to: 0
                 duration: VLCStyle.duration_long


=====================================
modules/gui/qt/util/qml/FadeControllerStateGroup.qml
=====================================
@@ -37,7 +37,6 @@ StateGroup {
                 target: root.target
 
                 visible: false
-                opacity: 0.0
             }
         },
         State {
@@ -47,7 +46,6 @@ StateGroup {
                 target: root.target
 
                 visible: true
-                opacity: 1.0
             }
         }
     ]
@@ -57,11 +55,11 @@ StateGroup {
             to: "hidden"
 
             SequentialAnimation {
-                NumberAnimation {
-                    property: "opacity"
-
+                OpacityAnimator {
                     duration: VLCStyle.duration_long
                     easing.type: Easing.InSine
+                    from: 1.0 // QTBUG-66475
+                    to: 0.0
                 }
 
                 PropertyAction {
@@ -77,11 +75,11 @@ StateGroup {
                     property: "visible"
                 }
 
-                NumberAnimation {
-                    property: "opacity"
-
+                OpacityAnimator {
                     duration: VLCStyle.duration_long
                     easing.type: Easing.OutSine
+                    from: 0.0 // QTBUG-66475
+                    to: 1.0
                 }
             }
         }


=====================================
modules/gui/qt/widgets/qml/FadingEdge.qml
=====================================
@@ -70,7 +70,8 @@ Item {
         implicitHeight: root.fadeSize
         implicitWidth: root.fadeSize
 
-        visible: (opacity > 0.0) && (root.backgroundColor.a > (1.0 - Number.EPSILON))
+        // NOTE: `OpacityAnimator` updates the opacity once the animation finishes.
+        visible: (opacity > 0.0 || enabled) && (root.backgroundColor.a > (1.0 - Number.EPSILON))
 
         opacity: enabled ? 1.0 : 0.0
 
@@ -80,7 +81,7 @@ Item {
 
             enabled: false
 
-            NumberAnimation {
+            OpacityAnimator {
                 duration: VLCStyle.duration_short
                 easing.type: Easing.InOutSine
             }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5e140d9b8dcbee3934c6bd75cb14a62f39cc1884...bc99c678a74ffb82c8c4f6d5d333861e7059278a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5e140d9b8dcbee3934c6bd75cb14a62f39cc1884...bc99c678a74ffb82c8c4f6d5d333861e7059278a
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