[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: introduce property `implicitPlayCoverShowPlay` in `MediaCover`

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Apr 2 12:39:23 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
2c18901d by Fatih Uzunoglu at 2026-04-02T12:25:12+00:00
qml: introduce property `implicitPlayCoverShowPlay` in `MediaCover`

- - - - -
48bceae7 by Fatih Uzunoglu at 2026-04-02T12:25:12+00:00
qml: adjust `implicitPlayCoverShowPlay` instead of `playCoverShowPlay` in `GridItem`

- - - - -
458047c3 by Fatih Uzunoglu at 2026-04-02T12:25:12+00:00
qml: respect `implicitPlayCoverShowPlay` in `NetworkGridItem`

This fixes play button being always visible if the model type
is not node or directory.

Possible regression since 2a59cf9c.

- - - - -


3 changed files:

- modules/gui/qt/network/qml/NetworkGridItem.qml
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/MediaCover.qml


Changes:

=====================================
modules/gui/qt/network/qml/NetworkGridItem.qml
=====================================
@@ -33,9 +33,15 @@ Widgets.GridItem {
     pictureWidth: VLCStyle.gridCover_network_width
     pictureHeight: VLCStyle.gridCover_network_height
 
-    playCoverShowPlay: (model.type !== NetworkMediaModel.TYPE_NODE
-                        &&
-                        model.type !== NetworkMediaModel.TYPE_DIRECTORY)
+    playCoverShowPlay: {
+        switch (model.type) {
+            case NetworkMediaModel.TYPE_NODE:
+            case NetworkMediaModel.TYPE_DIRECTORY:
+                return false
+            default:
+                return implicitPlayCoverShowPlay
+        }
+    }
 
     image: {
         if (model.artwork && model.artwork.toString() !== "") {


=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -61,6 +61,7 @@ T.ItemDelegate {
     property alias subtitle: subtitleTxt.text
     property alias subtitleVisible: subtitleTxt.visible
     property alias playCoverShowPlay: picture.playCoverShowPlay
+    property alias implicitPlayCoverShowPlay: picture.implicitPlayCoverShowPlay
     property alias playIconSize: picture.playIconSize
     property alias pictureRadius: picture.radius
     property alias effectiveRadius: picture.effectiveRadius
@@ -121,7 +122,7 @@ T.ItemDelegate {
 
             PropertyChanges {
                 target: picture
-                playCoverShowPlay: true
+                implicitPlayCoverShowPlay: true
             }
 
         }
@@ -136,7 +137,7 @@ T.ItemDelegate {
             SequentialAnimation {
                 PropertyAction {
                     target: picture
-                    properties: "playCoverShowPlay"
+                    property: "implicitPlayCoverShowPlay"
                 }
 
                 NumberAnimation {
@@ -154,7 +155,7 @@ T.ItemDelegate {
             SequentialAnimation {
                 PropertyAction {
                     target: picture
-                    property: "playCoverShowPlay"
+                    property: "implicitPlayCoverShowPlay"
                 }
 
                 NumberAnimation {
@@ -284,7 +285,7 @@ T.ItemDelegate {
         Widgets.MediaCover {
             id: picture
 
-            playCoverShowPlay: false
+            implicitPlayCoverShowPlay: false
             radius: VLCStyle.gridCover_radius
             color: theme.bg.secondary
 


=====================================
modules/gui/qt/widgets/qml/MediaCover.qml
=====================================
@@ -32,7 +32,8 @@ Item {
 
     property real playIconSize: VLCStyle.play_cover_normal
 
-    property bool playCoverShowPlay: false
+    property bool playCoverShowPlay: implicitPlayCoverShowPlay
+    property bool implicitPlayCoverShowPlay: false
 
     readonly property real effectiveRadius: fallbackImage.visible ? fallbackImage.effectiveRadius
                                                                   : (image.visible ? image.effectiveRadius



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6bb648fcc603e4dfb03040b978db228e12383948...458047c391d5cb64b2858bdee1febf909500b0d0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6bb648fcc603e4dfb03040b978db228e12383948...458047c391d5cb64b2858bdee1febf909500b0d0
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list