[vlc-devel] [PATCH 14/18] qml: use GridItem.pictureOverlay property for custom covers in Genre view's grid items

Prince Gupta guptaprince8832 at gmail.com
Wed Sep 23 19:40:12 CEST 2020


---
 .../gui/qt/medialibrary/qml/MusicGenres.qml   | 41 ++++++++++---------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/modules/gui/qt/medialibrary/qml/MusicGenres.qml b/modules/gui/qt/medialibrary/qml/MusicGenres.qml
index b74d7aaf94..6a0ad55dc9 100644
--- a/modules/gui/qt/medialibrary/qml/MusicGenres.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicGenres.qml
@@ -158,26 +158,27 @@ Widgets.NavigableFocusScope {
                     contextMenu.popup(selectionModel.selectedIndexes, globalMousePos)
                 }
 
-                Column {
-                    anchors.centerIn: parent
-                    opacity: item._highlighted ? .3 : 1
-
-                    Label {
-                         width: item.width
-                         elide: Text.ElideRight
-                         font.pixelSize: VLCStyle.fontSize_large
-                         font.weight: Font.DemiBold
-                         text: model.name
-                         color: "white"
-                         horizontalAlignment: Text.AlignHCenter
-                    }
-
-                    Widgets.CaptionLabel {
-                        width: item.width
-                        text: model.nb_tracks > 1 ? i18n.qtr("%1 Tracks").arg(model.nb_tracks) : i18n.qtr("%1 Track").arg(model.nb_tracks)
-                        opacity: .7
-                        color: "white"
-                        horizontalAlignment: Text.AlignHCenter
+                pictureOverlay: Item {
+                    Column {
+                        anchors.centerIn: parent
+
+                        Label {
+                             width: item.width
+                             elide: Text.ElideRight
+                             font.pixelSize: VLCStyle.fontSize_large
+                             font.weight: Font.DemiBold
+                             text: model.name
+                             color: "white"
+                             horizontalAlignment: Text.AlignHCenter
+                        }
+
+                        Widgets.CaptionLabel {
+                            width: item.width
+                            text: model.nb_tracks > 1 ? i18n.qtr("%1 Tracks").arg(model.nb_tracks) : i18n.qtr("%1 Track").arg(model.nb_tracks)
+                            opacity: .7
+                            color: "white"
+                            horizontalAlignment: Text.AlignHCenter
+                        }
                     }
                 }
             }
-- 
2.25.1



More information about the vlc-devel mailing list