[vlc-commits] [Git][videolan/vlc][master] 3 commits: Revert "qml: use `OpacityAnimator` instead of `NumberAnimation` in `FadeControllerStateGroup`"
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sat Mar 28 23:56:16 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
0b4473a8 by Fatih Uzunoglu at 2026-03-29T00:13:07+01:00
Revert "qml: use `OpacityAnimator` instead of `NumberAnimation` in `FadeControllerStateGroup`"
In the player page, there is a special situation that fade rectangles\
use the opacity value of the top and control bar, which are not the
visual parent of the fade rectangles (because fade rectangles are only
relevant when there is video playing, while the bars are relevant at
all times).
`OpacityAnimator` does not update the opacity value in Qt Quick items
until it finishes, so another item that want to participate in that
animation can not do so unless their scene graph nodes are a direct
or indirect child of the target item's (opacity) node.
Not only that, but `OpacityAnimator` can not be used here due to
QTBUG-66475 (requiring explicit `from` value), because the states
may change before the animations complete where in that case we
can not use explicit `from` value.
This reverts commit a59f9e058eda3b51a7f79ab440abb4bf4f458672.
- - - - -
7c08db59 by Fatih Uzunoglu at 2026-03-29T00:13:07+01:00
qml: adjust the parent of fade rectangles in `Player.qml`
This way the fade rectangles can use the already existing
opacity node of the control and top bars instead of Qt
creating a new implicit opacity node for them.
This is merely an optimization, not a behavioral change.
- - - - -
b7a5b605 by Fatih Uzunoglu at 2026-03-29T00:13:07+01:00
qml: make `target` property required in `FadeControllerStateGroup`
- - - - -
2 changed files:
- modules/gui/qt/player/qml/Player.qml
- modules/gui/qt/util/qml/FadeControllerStateGroup.qml
Changes:
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -233,6 +233,7 @@ FocusScope {
}
component FadeRectangle : Rectangle {
+ z: -99
implicitHeight: VLCStyle.dp(206, VLCStyle.scale)
SGManipulator {
@@ -245,13 +246,14 @@ FocusScope {
}
FadeRectangle {
+ parent: topBar
+
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
implicitHeight: VLCStyle.dp(206, VLCStyle.scale)
- opacity: topBar.opacity
visible: !topBarAcrylicBg.visible
gradient: Gradient {
@@ -261,14 +263,14 @@ FocusScope {
}
FadeRectangle {
+ parent: controlBar
+
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
implicitHeight: VLCStyle.dp(206, VLCStyle.scale)
- opacity: controlBar.opacity
-
gradient: Gradient {
GradientStop { position: 0; color: "transparent" }
GradientStop { position: .64; color: Qt.rgba(0, 0, 0, .8) }
=====================================
modules/gui/qt/util/qml/FadeControllerStateGroup.qml
=====================================
@@ -27,7 +27,7 @@ StateGroup {
state: target?.state ?? ""
- property Item target
+ required property Item target
states: [
State {
@@ -37,6 +37,7 @@ StateGroup {
target: root.target
visible: false
+ opacity: 0.0
}
},
State {
@@ -46,6 +47,7 @@ StateGroup {
target: root.target
visible: true
+ opacity: 1.0
}
}
]
@@ -55,11 +57,11 @@ StateGroup {
to: "hidden"
SequentialAnimation {
- OpacityAnimator {
+ NumberAnimation {
+ property: "opacity"
+
duration: VLCStyle.duration_long
easing.type: Easing.InSine
- from: 1.0 // QTBUG-66475
- to: 0.0
}
PropertyAction {
@@ -75,11 +77,11 @@ StateGroup {
property: "visible"
}
- OpacityAnimator {
+ NumberAnimation {
+ property: "opacity"
+
duration: VLCStyle.duration_long
easing.type: Easing.OutSine
- from: 0.0 // QTBUG-66475
- to: 1.0
}
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e7dc588554d80a11aaf9fbed0f86737dc37213c3...b7a5b6051155381fc0d0f40e7ac275971c39ff3f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e7dc588554d80a11aaf9fbed0f86737dc37213c3...b7a5b6051155381fc0d0f40e7ac275971c39ff3f
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list