[vlc-commits] qml: hide grid button for Music tracks list view

Prince Gupta git at videolan.org
Thu Jan 14 14:42:43 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Wed Jan  6 16:17:18 2021 +0530| [ae0b293eb3fa08d56fb5c1a38ac2e63812f274a0] | committer: Pierre Lamot

qml: hide grid button for Music tracks list view

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ae0b293eb3fa08d56fb5c1a38ac2e63812f274a0
---

 modules/gui/qt/medialibrary/qml/MusicDisplay.qml       | 2 ++
 modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml | 1 +
 2 files changed, 3 insertions(+)

diff --git a/modules/gui/qt/medialibrary/qml/MusicDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
index 5dc10cd8d8..3880a03016 100644
--- a/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicDisplay.qml
@@ -32,6 +32,7 @@ Widgets.PageLoader {
 
     property var sortModel
     property var contentModel
+    property bool isViewMultiView: true
 
     defaultPage: "artists"
     pageModel: [{
@@ -56,6 +57,7 @@ Widgets.PageLoader {
     onCurrentItemChanged: {
         sortModel = currentItem.sortModel
         contentModel = currentItem.model
+        isViewMultiView = currentItem.isViewMultiView === undefined || currentItem.isViewMultiView
     }
 
     function loadIndex(index) {
diff --git a/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
index 469c4af954..ed395dba00 100644
--- a/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
@@ -28,6 +28,7 @@ Widgets.NavigableFocusScope {
     property alias sortModel: tracklistdisplay_id.sortModel
     property alias model: tracklistdisplay_id.model
     property alias selectionModel: tracklistdisplay_id.selectionDelegateModel
+    readonly property bool isViewMultiView: false
 
     Widgets.DragItem {
         id: trackDragItem



More information about the vlc-commits mailing list