Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
662b4bad by Fatih Uzunoglu at 2026-01-22T20:46:41+00:00
qml: provide additional info if only one selected in drag item

If there is only one selected; now we display its title or name,
and track or item count.

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/DragItem.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/DragItem.qml
=====================================
@@ -613,7 +613,26 @@ Item {
         x: dragItem.coversXPos(_displayedCoversCount - 1) + dragItem.coverSize 
+ VLCStyle.margin_small
 
         visible: text && text !== ""
-        text: qsTr("%1 selected").arg(dragItem._indexesSize)
+        text: {
+            const data = dragItem._data[0]
+            const title = data?.title
+            if (dragItem._indexesSize === 1) {
+                const extra = (data?.nb_tracks > 0) ? qsTr("\n%1 
track(s)").arg(data.nb_tracks)
+                                                    : ((data?.count > 0) ? 
qsTr("\n%1 item(s)").arg(data.count)
+                                                                         : "")
+                if (title && title.length > 0) {
+                    return title + extra
+                } else {
+                    const name = dragItem._data[0]?.name
+                    if (name && name.length > 0)
+                        return name + extra
+                    else
+                        return qsTr("1 selected")
+                }
+            } else {
+                return qsTr("%1 selected").arg(dragItem._indexesSize)
+            }
+        }
         color: theme.fg.secondary
     }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/662b4bad7b46149eae620ced005a092d9b5456f8

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/662b4bad7b46149eae620ced005a092d9b5456f8
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to