[vlc-commits] qml: allow to hide list grid button in top banner
Prince Gupta
git at videolan.org
Thu Jan 14 14:42:32 UTC 2021
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Thu Dec 24 00:54:35 2020 +0530| [69ea8bae1f0bee875fd47a5e9d26a97c6c83044a] | committer: Pierre Lamot
qml: allow to hide list grid button in top banner
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69ea8bae1f0bee875fd47a5e9d26a97c6c83044a
---
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 59283bfcf7..6ac68049ff 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 3be84786c1..95ffed07c0 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;
More information about the vlc-commits
mailing list