[vlc-commits] qml: hide list grid button when appropriate in Discover view
Prince Gupta
git at videolan.org
Thu Jan 14 14:42:33 UTC 2021
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Thu Dec 24 00:55:04 2020 +0530| [2deb004d27e6c3f0ad11c3250f85f430c6779d16] | committer: Pierre Lamot
qml: hide list grid button when appropriate in Discover view
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2deb004d27e6c3f0ad11c3250f85f430c6779d16
---
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
More information about the vlc-commits
mailing list