[vlc-commits] qml: use SubtitleLabel for header of Genre albums view and align texts with content

Prince Gupta git at videolan.org
Tue Aug 18 17:14:49 CEST 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Jul 31 01:03:44 2020 +0530| [3b55343a8f6fc255f92aa220c276f645a8f5f6bd] | committer: Pierre Lamot

qml: use SubtitleLabel for header of Genre albums view and align texts with content

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

 modules/gui/qt/medialibrary/qml/MusicAlbums.qml        | 1 +
 modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/medialibrary/qml/MusicAlbums.qml b/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
index 224ec52180..983a0eefdc 100644
--- a/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
@@ -42,6 +42,7 @@ Widgets.NavigableFocusScope {
     //the index to "go to" when the view is loaded
     property var initialIndex: 0
     property int gridViewMarginTop: VLCStyle.margin_large
+    property var gridViewRowX: medialib.gridView ? view.currentItem.rowX : undefined
 
     navigationCancel: function() {
         if (view.currentItem.currentIndex <= 0) {
diff --git a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
index 945673813c..5f442f79d9 100644
--- a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
@@ -88,10 +88,17 @@ Widgets.NavigableFocusScope {
         id: albumGenreComponent
         /* List View */
         MusicAlbums {
+            id: albumsView
+
             property string genreName: ""
 
-            header: Widgets.LabelSeparator {
+            gridViewMarginTop: 0
+
+            header: Widgets.SubtitleLabel {
                 text: i18n.qtr("Genres - %1").arg(genreName)
+                leftPadding: (albumsView.gridViewRowX || VLCStyle.margin_large)
+                topPadding: VLCStyle.margin_large
+                bottomPadding: VLCStyle.margin_normal
                 width: root.width
             }
 



More information about the vlc-commits mailing list