[vlc-devel] [PATCH 29/39] qml: allow to hide list grid button in top banner
Prince Gupta
guptaprince8832 at gmail.com
Thu Jan 7 11:50:25 UTC 2021
---
modules/gui/qt/maininterface/qml/BannerSources.qml | 3 ++-
modules/gui/qt/maininterface/qml/MainDisplay.qml | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/maininterface/qml/BannerSources.qml b/modules/gui/qt/maininterface/qml/BannerSources.qml
index 4ee38346f6..7530ae6d88 100644
--- a/modules/gui/qt/maininterface/qml/BannerSources.qml
+++ b/modules/gui/qt/maininterface/qml/BannerSources.qml
@@ -44,7 +44,7 @@ Widgets.NavigableFocusScope {
property alias sortModel: sortControl.model
property var contentModel
-
+ property alias isViewMultiView: list_grid_btn.visible
property alias model: pLBannerSources.model
signal toogleMenu()
@@ -204,6 +204,7 @@ Widgets.NavigableFocusScope {
left: parent.left
leftMargin: VLCStyle.applicationHorizontalMargin + VLCStyle.margin_xsmall
}
+ enabled: list_grid_btn.visible || sortControl.visible
model: ObjectModel {
id: localContextModel
diff --git a/modules/gui/qt/maininterface/qml/MainDisplay.qml b/modules/gui/qt/maininterface/qml/MainDisplay.qml
index 3857d08c48..b443bc3607 100644
--- a/modules/gui/qt/maininterface/qml/MainDisplay.qml
+++ b/modules/gui/qt/maininterface/qml/MainDisplay.qml
@@ -64,6 +64,9 @@ Widgets.NavigableFocusScope {
sourcesBanner.sortModel = Qt.binding(function () { return stackView.currentItem.sortModel })
sourcesBanner.contentModel = Qt.binding(function () { return stackView.currentItem.contentModel })
sourcesBanner.extraLocalActions = Qt.binding(function () { return stackView.currentItem.extraLocalActions })
+ sourcesBanner.isViewMultiView = Qt.binding(function () {
+ return stackView.currentItem.isViewMultiView === undefined || stackView.currentItem.isViewMultiView
+ })
// Restore sourcesBanner state
sourcesBanner.selectedIndex = pageModel.filter(function (e) {
return e.listed;
--
2.25.1
More information about the vlc-devel
mailing list