[vlc-commits] [Git][videolan/vlc][master] qml: establish binding in `delegateItem` property of FadingEdgeForListView
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon May 6 15:22:20 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
48b91984 by Fatih Uzunoglu at 2024-05-06T12:48:10+00:00
qml: establish binding in `delegateItem` property of FadingEdgeForListView
When `listView.itemAtIndex(0)` is used, the delegate item is
not resolved when new items added which makes it remain
null.
When `listView.count` is referred as done here, the QML
engine establishes a relational binding and this causes
the property to be updated each time the count is updated.
Regression since 300b3b9c.
- - - - -
1 changed file:
- modules/gui/qt/widgets/qml/FadingEdgeForListView.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/FadingEdgeForListView.qml
=====================================
@@ -45,7 +45,7 @@ FadingEdge {
listView.removeDisplaced?.running) ?? false
// FIXME: Delegate with variable size
- readonly property Item delegateItem: listView.itemAtIndex(0)
+ readonly property Item delegateItem: (listView.count > 0) ? listView.itemAtIndex(0) : null
readonly property Item firstVisibleItem: {
if (transitionsRunning || !delegateItem)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/48b919841cd9e83febd58b8be6472c03051d5f5e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/48b919841cd9e83febd58b8be6472c03051d5f5e
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