[vlc-devel] [PATCH 17/22] qml: add title in music genre view

Pierre Lamot pierre at videolabs.io
Fri Feb 14 11:23:52 CET 2020


---
 .../gui/qt/medialibrary/qml/MusicGenresDisplay.qml  | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
index 9cd7e521eb..6763e6f743 100644
--- a/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicGenresDisplay.qml
@@ -43,6 +43,14 @@ Widgets.NavigableFocusScope {
             view.currentItem.currentIndex = 0;
     }
 
+    Component {
+        id: headerComponent
+        Widgets.LabelSeparator {
+            text: i18n.qtr("Genres")
+            width: root.width
+        }
+    }
+
     Util.SelectableDelegateModel {
         id: delegateModel
         model: MLGenreModel {
@@ -120,6 +128,9 @@ Widgets.NavigableFocusScope {
 
             model: delegateModel
             modelCount: delegateModel.items.count
+
+            headerDelegate: headerComponent
+
             delegate: AudioGridItem {
                 id: gridItem
 
@@ -161,6 +172,8 @@ Widgets.NavigableFocusScope {
             model: delegateModel.parts.list
             modelCount: delegateModel.items.count
 
+            header: headerComponent
+
             focus: true
             spacing: VLCStyle.margin_xxxsmall
 
-- 
2.17.1



More information about the vlc-devel mailing list