Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
d3e4f339 by Prince Gupta at 2024-09-13T12:16:58+00:00
qml: fix header view alignment in BrowseView

closes #28586

- - - - -


1 changed file:

- modules/gui/qt/network/qml/BrowseTreeDisplay.qml


Changes:

=====================================
modules/gui/qt/network/qml/BrowseTreeDisplay.qml
=====================================
@@ -37,6 +37,11 @@ MainViewLoader {
     readonly property int contentLeftMargin: currentItem?.contentLeftMargin ?? 0
     readonly property int contentRightMargin: currentItem?.contentRightMargin 
?? 0
 
+    readonly property int headerLeftPadding: (contentLeftMargin > 0)
+                                             ? contentLeftMargin : 
VLCStyle.dynamicAppMargins(width)
+    readonly property int headerRightPadding: (contentRightMargin > 0)
+                                              ? contentRightMargin : 
VLCStyle.dynamicAppMargins(width)
+
     // fixme remove this
     property Item _currentView: currentItem
 
@@ -137,8 +142,8 @@ MainViewLoader {
             headerDelegate: BrowseTreeHeader {
                 providerModel: root.model
 
-                leftPadding: root.contentLeftMargin
-                rightPadding: root.contentRightMargin
+                leftPadding: root.headerLeftPadding
+                rightPadding: root.headerRightPadding
 
                 width: gridView.width
 
@@ -276,8 +281,8 @@ MainViewLoader {
             header: BrowseTreeHeader {
                 providerModel: root.model
 
-                leftPadding: root.contentLeftMargin
-                rightPadding: root.contentRightMargin
+                leftPadding: root.contentLeftPadding
+                rightPadding: root.contentRightPadding
 
                 width: tableView.width
 
@@ -411,6 +416,9 @@ MainViewLoader {
 
                 focus: true
 
+                leftPadding: root.headerLeftPadding
+                rightPadding: root.headerRightPadding
+
                 providerModel: root.model
 
                 Layout.fillWidth: true



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d3e4f3391a3ab40c8a78744c80b984c3cad7477f

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/d3e4f3391a3ab40c8a78744c80b984c3cad7477f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to