[vlc-commits] [Git][videolan/vlc][master] qml: control bar delayed calculation should be done at appropriate time
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Jul 22 14:45:18 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
ac60f455 by Fatih Uzunoglu at 2024-07-22T14:06:36+00:00
qml: control bar delayed calculation should be done at appropriate time
The calculation is not necessary, when `when` is not set. So, there is
no need to do the calculation.
At the same time, the calculation must be done _after_ `when` is set.
Currently, there is no guarantee for that and it causes issues with
expanding items getting invisible unexpectedly.
- - - - -
1 changed file:
- modules/gui/qt/player/qml/ControlRepeater.qml
Changes:
=====================================
modules/gui/qt/player/qml/ControlRepeater.qml
=====================================
@@ -65,8 +65,22 @@ Repeater {
Binding on visible {
delayed: true // this is important
- when: (loader.status === Loader.Ready)
- value: (loader.x + loader.Layout.minimumWidth <= repeater.availableWidth)
+ when: condition
+ value: {
+ if (condition)
+ return (loader.x + loader.Layout.minimumWidth <= repeater.availableWidth)
+ else
+ return true;
+ }
+
+ property bool condition: false
+
+ Binding on condition {
+ delayed: true
+ value: (loader.status === Loader.Ready) &&
+ (loader.Layout.minimumWidth > 0) &&
+ (repeater.availableWidth < Number.MAX_VALUE)
+ }
}
// Events
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ac60f455ca408517db6396707d14ece00d0a4856
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ac60f455ca408517db6396707d14ece00d0a4856
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