[vlc-commits] [Git][videolan/vlc][master] qml: propagate left and right paddings in `MainViewLoader`
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Apr 3 14:13:47 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
96e2cd72 by Fatih Uzunoglu at 2026-04-03T13:54:44+00:00
qml: propagate left and right paddings in `MainViewLoader`
This fixes `VLCStyle.applicationHorizontalMargin` not
being respected in most media library pages.
- - - - -
1 changed file:
- modules/gui/qt/maininterface/qml/MainViewLoader.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainViewLoader.qml
=====================================
@@ -63,6 +63,9 @@ Loader {
readonly property bool isLoading: model.loading
+ property real leftPadding
+ property real rightPadding
+
onIsLoadingChanged: {
// Adjust the cursor. Unless the loaded item (view) sets a cursor
// globally or for itself, this is going to be respected. It should
@@ -148,6 +151,25 @@ Loader {
onInitialIndexChanged: resetFocus()
+ onLoaded: {
+ // Padding is supposed to be the margins of the content,
+ // propagating padding is not conventional. But we have
+ // to do this because that is what `PageLoader` through
+ // `StackViewExt` does.
+
+ if (item.leftPadding !== undefined) {
+ item.leftPadding = Qt.binding(function() {
+ return root.leftPadding
+ })
+ }
+
+ if (item.rightPadding !== undefined) {
+ item.rightPadding = Qt.binding(function() {
+ return root.rightPadding
+ })
+ }
+ }
+
Connections {
target: model
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/96e2cd72d9c8593cbc27401d1cf6a5d5b0f61cc3
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/96e2cd72d9c8593cbc27401d1cf6a5d5b0f61cc3
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list