[vlc-devel] [PATCH 03/12] qml: add left and top padding in headers of NetworkHomeDisplay

Prince Gupta guptaprince8832 at gmail.com
Mon Aug 24 17:08:20 CEST 2020


qml: provide starting left margin in NetworkHomeDeviceListView
---
 modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml | 5 +++++
 modules/gui/qt/network/qml/NetworkHomeDisplay.qml        | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml b/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml
index 6a21a05963..10c576f7eb 100644
--- a/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml
+++ b/modules/gui/qt/network/qml/NetworkHomeDeviceListView.qml
@@ -33,6 +33,7 @@ Widgets.NavigableFocusScope {
     property alias ctx: deviceModel.ctx
     property alias sd_source: deviceModel.sd_source
     property alias model: deviceModel
+    property int leftPadding: VLCStyle.margin_xlarge
 
     property int _currentIndex: -1
     on_CurrentIndexChanged: {
@@ -74,6 +75,10 @@ Widgets.NavigableFocusScope {
         orientation: ListView.Horizontal
         anchors.fill: parent
 
+        header: Item {
+            width: root.leftPadding
+        }
+
         model: deviceModel
         delegate: NetworkGridItem {
             focus: true
diff --git a/modules/gui/qt/network/qml/NetworkHomeDisplay.qml b/modules/gui/qt/network/qml/NetworkHomeDisplay.qml
index 8df8baefb3..0c00fb9ebe 100644
--- a/modules/gui/qt/network/qml/NetworkHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/NetworkHomeDisplay.qml
@@ -72,6 +72,7 @@ Widgets.NavigableFocusScope {
                 text: i18n.qtr("My Machine")
                 width: flickable.width
                 visible: deviceSection.model.count !== 0
+                leftPadding: VLCStyle.margin_xlarge
             }
 
             NetworkHomeDeviceListView {
@@ -97,6 +98,8 @@ Widgets.NavigableFocusScope {
                 text: i18n.qtr("My LAN")
                 width: flickable.width
                 visible: lanSection.model.count !== 0
+                leftPadding: VLCStyle.margin_xlarge
+                topPadding: deviceLabel.visible ? VLCStyle.margin_small : 0
             }
 
             NetworkHomeDeviceListView {
-- 
2.25.1



More information about the vlc-devel mailing list