[vlc-commits] qml: provide bottom margin for miniplayer in all main views

Prince Gupta git at videolan.org
Fri Nov 27 14:52:35 CET 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Nov 20 23:26:55 2020 +0530| [145bda6f2f4a21372f087df8ea9f8b1b75cabb08] | committer: Pierre Lamot

qml: provide bottom margin for miniplayer in all main views

done using MainInterface.MainGridView and MainInterface.MainTableView as base for these views or explicitely specifying footer as MiniPlayerBottomMargin where former is not applicable

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

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

 modules/gui/qt/medialibrary/qml/MusicAlbums.qml           | 5 +++--
 modules/gui/qt/medialibrary/qml/MusicArtist.qml           | 5 +++--
 modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml    | 3 +++
 modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml   | 5 +++--
 modules/gui/qt/medialibrary/qml/MusicGenres.qml           | 5 +++--
 modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml | 3 ++-
 modules/gui/qt/medialibrary/qml/VideoDisplay.qml          | 3 ++-
 modules/gui/qt/medialibrary/qml/VideoListDisplay.qml      | 3 ++-
 modules/gui/qt/network/qml/NetworkBrowseDisplay.qml       | 5 +++--
 modules/gui/qt/network/qml/NetworkHomeDisplay.qml         | 5 +++++
 modules/gui/qt/network/qml/ServicesHomeDisplay.qml        | 7 ++++++-
 11 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/modules/gui/qt/medialibrary/qml/MusicAlbums.qml b/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
index 983af41afd..4a39f8ed2a 100644
--- a/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
@@ -24,6 +24,7 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 Widgets.NavigableFocusScope {
@@ -104,7 +105,7 @@ Widgets.NavigableFocusScope {
     Component {
         id: gridComponent
 
-        Widgets.ExpandGridView {
+        MainInterface.MainGridView {
             id: gridView_id
 
             activeFocusOnTab:true
@@ -174,7 +175,7 @@ Widgets.NavigableFocusScope {
     Component {
         id: tableComponent
 
-        Widgets.KeyNavigableTableView {
+        MainInterface.MainTableView {
             id: tableView_id
 
             readonly property int _nbCols: VLCStyle.gridColumnsForWidth(tableView_id.availableRowWidth)
diff --git a/modules/gui/qt/medialibrary/qml/MusicArtist.qml b/modules/gui/qt/medialibrary/qml/MusicArtist.qml
index 1ba3461b62..4573b9bc96 100644
--- a/modules/gui/qt/medialibrary/qml/MusicArtist.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicArtist.qml
@@ -24,6 +24,7 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 Widgets.NavigableFocusScope {
@@ -237,7 +238,7 @@ Widgets.NavigableFocusScope {
     Component {
         id: gridComponent
 
-        Widgets.ExpandGridView {
+        MainInterface.MainGridView {
             id: gridView_id
 
             focus: true
@@ -304,7 +305,7 @@ Widgets.NavigableFocusScope {
     Component {
         id: tableComponent
 
-        Widgets.KeyNavigableTableView {
+        MainInterface.MainTableView {
             id: tableView_id
 
             readonly property int _nbCols: VLCStyle.gridColumnsForWidth(tableView_id.availableRowWidth)
diff --git a/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml b/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
index 666819383f..35c2472c9c 100644
--- a/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
@@ -24,6 +24,7 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 Widgets.NavigableFocusScope {
@@ -109,6 +110,8 @@ Widgets.NavigableFocusScope {
             currentIndex: -1
 
             focus: true
+            footer: MainInterface.MiniPlayerBottomMargin {
+            }
 
             onCurrentIndexChanged: {
                 if (artistList.currentIndex < artistModel.count) {
diff --git a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
index 1e7161f4d6..48ff1b7a03 100644
--- a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
@@ -24,6 +24,7 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 
@@ -114,7 +115,7 @@ Widgets.PageLoader {
             Component {
                 id: gridComponent
 
-                Widgets.ExpandGridView {
+                MainInterface.MainGridView {
                     id: artistGrid
 
                     anchors.fill: parent
@@ -169,7 +170,7 @@ Widgets.PageLoader {
             Component {
                 id: tableComponent
 
-                Widgets.KeyNavigableTableView {
+                MainInterface.MainTableView {
                     id: artistTable
 
                     readonly property int _nbCols: VLCStyle.gridColumnsForWidth(artistTable.availableRowWidth)
diff --git a/modules/gui/qt/medialibrary/qml/MusicGenres.qml b/modules/gui/qt/medialibrary/qml/MusicGenres.qml
index 1482d46b88..c44c5e8f40 100644
--- a/modules/gui/qt/medialibrary/qml/MusicGenres.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicGenres.qml
@@ -23,6 +23,7 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 Widgets.NavigableFocusScope {
@@ -125,7 +126,7 @@ Widgets.NavigableFocusScope {
     /* Grid View */
     Component {
         id: gridComponent
-        Widgets.ExpandGridView {
+        MainInterface.MainGridView {
             id: gridView_id
 
             delegateModel: selectionModel
@@ -199,7 +200,7 @@ Widgets.NavigableFocusScope {
     Component {
         id: tableComponent
         /* Table View */
-        Widgets.KeyNavigableTableView {
+        MainInterface.MainTableView {
             id: tableView_id
 
             readonly property int _nameColSpan: Math.max(
diff --git a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
index 12202fbe11..d50c04a236 100644
--- a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
@@ -24,9 +24,10 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
-Widgets.KeyNavigableTableView {
+MainInterface.MainTableView {
     id: root
 
     property var sortModelSmall: [
diff --git a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
index 73da8c1e4e..1069113075 100644
--- a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
@@ -24,6 +24,7 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 Widgets.NavigableFocusScope {
@@ -92,7 +93,7 @@ Widgets.NavigableFocusScope {
     Component {
         id: gridComponent
 
-        Widgets.ExpandGridView {
+        MainInterface.MainGridView {
             id: videosGV
             property Item currentItem: Item{}
 
diff --git a/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
index 5a7965f321..0aa2772172 100644
--- a/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
@@ -23,9 +23,10 @@ import org.videolan.medialib 0.1
 
 import "qrc:///util" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
-Widgets.KeyNavigableTableView {
+MainInterface.MainTableView {
     id: listView_id
 
     property Component thumbnailHeader: Item {
diff --git a/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml b/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
index e1630d72da..0ae9be7919 100644
--- a/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
+++ b/modules/gui/qt/network/qml/NetworkBrowseDisplay.qml
@@ -26,6 +26,7 @@ import org.videolan.vlc 0.1
 
 import "qrc:///util/" as Util
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 Widgets.NavigableFocusScope {
@@ -94,7 +95,7 @@ Widgets.NavigableFocusScope {
     Component{
         id: gridComponent
 
-        Widgets.ExpandGridView {
+        MainInterface.MainGridView {
             id: gridView
 
             delegateModel: selectionModel
@@ -184,7 +185,7 @@ Widgets.NavigableFocusScope {
     Component{
         id: tableComponent
 
-        Widgets.KeyNavigableTableView {
+        MainInterface.MainTableView {
             id: tableView
 
             readonly property int _nbCols: VLCStyle.gridColumnsForWidth(tableView.availableRowWidth)
diff --git a/modules/gui/qt/network/qml/NetworkHomeDisplay.qml b/modules/gui/qt/network/qml/NetworkHomeDisplay.qml
index 857e1440d2..fe0ce96c82 100644
--- a/modules/gui/qt/network/qml/NetworkHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/NetworkHomeDisplay.qml
@@ -23,6 +23,7 @@ import QtQml 2.11
 import org.videolan.vlc 0.1
 
 import "qrc:///widgets/" as Widgets
+import "qrc:///main/" as MainInterface
 import "qrc:///util/" as Util
 import "qrc:///style/"
 
@@ -120,6 +121,10 @@ Widgets.NavigableFocusScope {
                         _centerFlickableOnItem(lanLabel.y, lanSection.y + lanSection.height)
                 }
             }
+
+            MainInterface.MiniPlayerBottomMargin {
+                width: flickable.width
+            }
         }
 
     }
diff --git a/modules/gui/qt/network/qml/ServicesHomeDisplay.qml b/modules/gui/qt/network/qml/ServicesHomeDisplay.qml
index 89de1f6104..b787b5ecc4 100644
--- a/modules/gui/qt/network/qml/ServicesHomeDisplay.qml
+++ b/modules/gui/qt/network/qml/ServicesHomeDisplay.qml
@@ -25,6 +25,7 @@ import org.videolan.vlc 0.1
 
 import "qrc:///widgets/" as Widgets
 import "qrc:///util/" as Util
+import "qrc:///main/" as MainInterface
 import "qrc:///style/"
 
 Widgets.PageLoader {
@@ -146,6 +147,10 @@ Widgets.PageLoader {
             rightMargin: VLCStyle.margin_large
             spacing: VLCStyle.margin_xsmall
 
+            footer: MainInterface.MiniPlayerBottomMargin {
+                width: servicesView.width
+            }
+
             delegate: Rectangle {
                 width: servicesView.width - VLCStyle.margin_large * 2
                 height: row.implicitHeight + VLCStyle.margin_small * 2
@@ -271,7 +276,7 @@ Widgets.PageLoader {
     Component {
         id: allSourcesComponent
 
-        Widgets.ExpandGridView {
+        MainInterface.MainGridView {
             id: gridView
 
             delegateModel: selectionModel



More information about the vlc-commits mailing list