From 6e3c2c1781c1aa59e76cd5f08c2734c78ae46385 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 17:16:54 +0200
Subject: [PATCH 01/10] qml: expose `interactive` in `ExpandGridView`

---
 modules/gui/qt/widgets/qml/ExpandGridView.qml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/gui/qt/widgets/qml/ExpandGridView.qml b/modules/gui/qt/widgets/qml/ExpandGridView.qml
index c285143f53ac..3e7bd788fdb0 100644
--- a/modules/gui/qt/widgets/qml/ExpandGridView.qml
+++ b/modules/gui/qt/widgets/qml/ExpandGridView.qml
@@ -136,6 +136,7 @@ FocusScope {
     property alias contentWidth: flickable.contentWidth
     property alias contentX: flickable.contentX
     property alias gridScrollBar: flickableScrollBar
+    property alias interactive: flickable.interactive
 
     property alias expandDelegate: expandItemLoader.sourceComponent
     property alias expandItem: expandItemLoader.item
-- 
GitLab


From f5f5d3a59544589254f9be7442e4877f66fd8cfa Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 17:17:10 +0200
Subject: [PATCH 02/10] qml: expose `interactive` in `BrowseDeviceView`

---
 modules/gui/qt/network/qml/BrowseDeviceView.qml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/gui/qt/network/qml/BrowseDeviceView.qml b/modules/gui/qt/network/qml/BrowseDeviceView.qml
index e6eda2a80e50..e09878e4b69c 100644
--- a/modules/gui/qt/network/qml/BrowseDeviceView.qml
+++ b/modules/gui/qt/network/qml/BrowseDeviceView.qml
@@ -71,6 +71,8 @@ FocusScope {
 
     property string title
 
+    property bool interactive: true
+
     // Aliases
 
     property alias leftPadding: view.leftPadding
@@ -202,6 +204,8 @@ FocusScope {
 
             selectionModel: modelSelect
 
+            interactive: root.interactive
+
             Navigation.parentItem: root
 
             Navigation.upItem: headerItem
@@ -303,6 +307,8 @@ FocusScope {
 
             selectionModel: modelSelect
 
+            interactive: root.interactive
+
             Navigation.parentItem: root
 
             Navigation.upItem: headerItem
-- 
GitLab


From 8883f7629a0511e4c7dd393209290a8b3fc7be17 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 17:21:28 +0200
Subject: [PATCH 03/10] qml: disable `interactive` in `BrowseHomeDisplay`
 sub-flickables

Although this is technically a nested flickable situation, sub-
flickables are non-functional. We can disable flicking by setting
interactive to `false` in the sub-flickables.
---
 modules/gui/qt/network/qml/BrowseHomeDisplay.qml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
index 2e291be89361..321c0c088581 100644
--- a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
@@ -282,6 +282,8 @@ FocusScope {
 
         visible: (model.count !== 0)
 
+        interactive: false
+
         onBrowse: (tree, reason) => root.browse(tree, reason)
         onSeeAll: (reason) => root.seeAllDevices(title, model.sd_source, reason)
 
-- 
GitLab


From 3c660779d7221cede9c542600006030b4fed6dab Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 17:38:07 +0200
Subject: [PATCH 04/10] qml: do not consider vertical space at the end in
 content height of `ExpandGridView`

Spacing is only relevant between rows and columns. The last row or column should not
have spacing.
---
 modules/gui/qt/widgets/qml/ExpandGridView.qml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/widgets/qml/ExpandGridView.qml b/modules/gui/qt/widgets/qml/ExpandGridView.qml
index 3e7bd788fdb0..f4ad58c5dd51 100644
--- a/modules/gui/qt/widgets/qml/ExpandGridView.qml
+++ b/modules/gui/qt/widgets/qml/ExpandGridView.qml
@@ -165,7 +165,8 @@ FocusScope {
     }
 
     contentHeight: {
-        const size = getItemPos(_count - 1)[1] + rowHeight + _expandItemVerticalSpace
+        // the trailing row spacing should not be accounted when calculating the content height:
+        const size = getItemPos(_count - 1)[1] + rowHeight + _expandItemVerticalSpace - verticalSpacing
 
         // NOTE: topMargin and headerHeight are included in root.getItemPos.
         if (footerItem)
-- 
GitLab


From b366e2d5d78503f2882f35369b28bbd542919d06 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 17:48:45 +0200
Subject: [PATCH 05/10] qml: do not use negative spacing in `BrowseHomeDisplay`

---
 modules/gui/qt/network/qml/BrowseHomeDisplay.qml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
index 321c0c088581..dd3367ff8cff 100644
--- a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
@@ -174,8 +174,7 @@ FocusScope {
             width: flickable.width
             height: implicitHeight
 
-            spacing: (MainCtx.gridView ? VLCStyle.gridView_spacing : VLCStyle.tableView_spacing) -
-                     VLCStyle.layoutTitle_top_padding
+            spacing: 0 // relied on the generous padding of ViewHeader instead
 
             Navigation.parentItem: root
 
-- 
GitLab


From 5fff5a80c00111465b14bc8be83cd838f78f6d1d Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 17:49:15 +0200
Subject: [PATCH 06/10] qml: expose `enable{Beginning,End}Fade` in
 `BrowseDeviceView`

---
 modules/gui/qt/network/qml/BrowseDeviceView.qml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/gui/qt/network/qml/BrowseDeviceView.qml b/modules/gui/qt/network/qml/BrowseDeviceView.qml
index e09878e4b69c..4b1546d0a1f4 100644
--- a/modules/gui/qt/network/qml/BrowseDeviceView.qml
+++ b/modules/gui/qt/network/qml/BrowseDeviceView.qml
@@ -73,6 +73,9 @@ FocusScope {
 
     property bool interactive: true
 
+    property bool enableBeginningFade: true
+    property bool enableEndFade: true
+
     // Aliases
 
     property alias leftPadding: view.leftPadding
@@ -309,6 +312,9 @@ FocusScope {
 
             interactive: root.interactive
 
+            fadingEdge.enableBeginningFade: root.enableBeginningFade
+            fadingEdge.enableEndFade: root.enableEndFade
+
             Navigation.parentItem: root
 
             Navigation.upItem: headerItem
-- 
GitLab


From 2150358d4919e8cdcdee4ad36f2fee35faded6e5 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 17:49:31 +0200
Subject: [PATCH 07/10] qml: disable fading edge effect in `BrowseHomeDisplay`

---
 modules/gui/qt/network/qml/BrowseHomeDisplay.qml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
index dd3367ff8cff..5a552daaafe6 100644
--- a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
@@ -283,6 +283,9 @@ FocusScope {
 
         interactive: false
 
+        enableBeginningFade: false
+        enableEndFade: false
+
         onBrowse: (tree, reason) => root.browse(tree, reason)
         onSeeAll: (reason) => root.seeAllDevices(title, model.sd_source, reason)
 
-- 
GitLab


From 918cf61c21060cfef703851fbb18b02bbd82232c Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 22:58:24 +0200
Subject: [PATCH 08/10] qml: expose `reuseItems` in `TableViewExt`

---
 modules/gui/qt/widgets/qml/TableViewExt.qml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/qt/widgets/qml/TableViewExt.qml b/modules/gui/qt/widgets/qml/TableViewExt.qml
index fbc6a5d8faf9..797246854962 100644
--- a/modules/gui/qt/widgets/qml/TableViewExt.qml
+++ b/modules/gui/qt/widgets/qml/TableViewExt.qml
@@ -177,6 +177,8 @@ FocusScope {
 
     property alias colorContext: view.colorContext
 
+    property alias reuseItems: view.reuseItems
+
     // Signals
 
     //forwarded from subview
-- 
GitLab


From d2fea41d92d85d91540b3ab8cb8ec77a40a79c07 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 22:55:30 +0200
Subject: [PATCH 09/10] qml: expose `reuseItems` in `BrowseDeviceView`

---
 modules/gui/qt/network/qml/BrowseDeviceView.qml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/gui/qt/network/qml/BrowseDeviceView.qml b/modules/gui/qt/network/qml/BrowseDeviceView.qml
index 4b1546d0a1f4..8b57a7c7cb4b 100644
--- a/modules/gui/qt/network/qml/BrowseDeviceView.qml
+++ b/modules/gui/qt/network/qml/BrowseDeviceView.qml
@@ -76,6 +76,8 @@ FocusScope {
     property bool enableBeginningFade: true
     property bool enableEndFade: true
 
+    property bool reuseItems: true
+
     // Aliases
 
     property alias leftPadding: view.leftPadding
@@ -209,6 +211,8 @@ FocusScope {
 
             interactive: root.interactive
 
+            reuseItems: root.reuseItems
+
             Navigation.parentItem: root
 
             Navigation.upItem: headerItem
@@ -312,6 +316,8 @@ FocusScope {
 
             interactive: root.interactive
 
+            reuseItems: root.reuseItems
+
             fadingEdge.enableBeginningFade: root.enableBeginningFade
             fadingEdge.enableEndFade: root.enableEndFade
 
-- 
GitLab


From dc212ef680ade2f7765c6c8854d546a3c6514d85 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Tue, 11 Mar 2025 23:01:01 +0200
Subject: [PATCH 10/10] qml: fix browse page getting completely unusable in
 grid mode

---
 modules/gui/qt/network/qml/BrowseHomeDisplay.qml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
index 5a552daaafe6..7d99f69e65b5 100644
--- a/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/BrowseHomeDisplay.qml
@@ -286,6 +286,9 @@ FocusScope {
         enableBeginningFade: false
         enableEndFade: false
 
+        // FIXME: ExpandGridView makes this page completely unusable when `reuseItems` is set (#29084):
+        reuseItems: !MainCtx.gridView
+
         onBrowse: (tree, reason) => root.browse(tree, reason)
         onSeeAll: (reason) => root.seeAllDevices(title, model.sd_source, reason)
 
-- 
GitLab