[vlc-devel] [PATCH 5/6] qml: provide bottom margin for miniplayer in all main views
Prince Gupta
guptaprince8832 at gmail.com
Fri Nov 20 18:38:55 CET 2020
done using MainInterface.MainGridView and MainInterface.MainTableView as base for these views or explicitely specifying footer as MiniPlayerBottomMargin where former is not applicable
---
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 3ee2bbab1a..2e1cc2ae3e 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 {
@@ -119,6 +120,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
@@ -244,7 +249,7 @@ Widgets.PageLoader {
Component {
id: allSourcesComponent
- Widgets.ExpandGridView {
+ MainInterface.MainGridView {
id: gridView
delegateModel: selectionModel
--
2.25.1
More information about the vlc-devel
mailing list