[vlc-devel] [PATCH 30/39] qml: hide list grid button when appropriate in Discover view

Prince Gupta guptaprince8832 at gmail.com
Thu Jan 7 11:50:26 UTC 2021


---
 modules/gui/qt/network/qml/DiscoverDisplay.qml     | 2 ++
 modules/gui/qt/network/qml/DiscoverUrlDisplay.qml  | 2 ++
 modules/gui/qt/network/qml/ServicesHomeDisplay.qml | 6 ++++++
 3 files changed, 10 insertions(+)

diff --git a/modules/gui/qt/network/qml/DiscoverDisplay.qml b/modules/gui/qt/network/qml/DiscoverDisplay.qml
index 8d7543c007..aa6af189bf 100644
--- a/modules/gui/qt/network/qml/DiscoverDisplay.qml
+++ b/modules/gui/qt/network/qml/DiscoverDisplay.qml
@@ -31,6 +31,7 @@ Widgets.PageLoader {
 
     property var sortModel
     property var contentModel
+    property bool isViewMultiView: false
 
     //name and properties of the tab to be initially loaded
     defaultPage: "services"
@@ -50,6 +51,7 @@ Widgets.PageLoader {
         sortModel = currentItem.sortModel
         contentModel = currentItem.model
         localMenuDelegate = !!currentItem.localMenuDelegate ? currentItem.localMenuDelegate : menuDelegate
+        isViewMultiView = currentItem.isViewMultiView === undefined || currentItem.isViewMultiView
     }
 
 
diff --git a/modules/gui/qt/network/qml/DiscoverUrlDisplay.qml b/modules/gui/qt/network/qml/DiscoverUrlDisplay.qml
index 07333b6e0a..23e1215f2b 100644
--- a/modules/gui/qt/network/qml/DiscoverUrlDisplay.qml
+++ b/modules/gui/qt/network/qml/DiscoverUrlDisplay.qml
@@ -29,6 +29,8 @@ import "qrc:///style/"
 Widgets.NavigableFocusScope {
     id: root
 
+    readonly property bool isViewMultiView: false
+
     Column {
         anchors.fill: parent
 
diff --git a/modules/gui/qt/network/qml/ServicesHomeDisplay.qml b/modules/gui/qt/network/qml/ServicesHomeDisplay.qml
index b787b5ecc4..461c50c519 100644
--- a/modules/gui/qt/network/qml/ServicesHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/ServicesHomeDisplay.qml
@@ -31,6 +31,7 @@ import "qrc:///style/"
 Widgets.PageLoader {
     id: root
 
+    property bool isViewMultiView: false
     property var sortModel
     property var model
     property Component localMenuDelegate: null
@@ -54,6 +55,7 @@ Widgets.PageLoader {
         sortModel = currentItem.sortModel
         model = currentItem.model
         localMenuDelegate = !!currentItem.addressBar ? currentItem.addressBar : null
+        isViewMultiView = currentItem.isViewMultiView === undefined || currentItem.isViewMultiView
     }
 
     Component {
@@ -141,6 +143,8 @@ Widgets.PageLoader {
         Widgets.KeyNavigableListView {
             id: servicesView
 
+            readonly property bool isViewMultiView: false
+
             model: discoveryFilterModel
             topMargin: VLCStyle.margin_large
             leftMargin: VLCStyle.margin_large
@@ -279,6 +283,8 @@ Widgets.PageLoader {
         MainInterface.MainGridView {
             id: gridView
 
+            readonly property bool isViewMultiView: false
+
             delegateModel: selectionModel
             model: sourcesFilterModel
             topMargin: VLCStyle.margin_large
-- 
2.25.1



More information about the vlc-devel mailing list