[vlc-devel] [PATCH 08/14] qml: use colDelegate on MusicTrackListDisplay

Abel Tesfaye abeltesfaye45 at gmail.com
Tue Aug 6 11:18:42 CEST 2019


From: Abel Tesfaye <Abeltesfaye45 at gmail.com>

---
 .../qml/mediacenter/MusicTrackListDisplay.qml | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/modules/gui/qt/qml/mediacenter/MusicTrackListDisplay.qml b/modules/gui/qt/qml/mediacenter/MusicTrackListDisplay.qml
index 9314cd0ecc..76a7653dce 100644
--- a/modules/gui/qt/qml/mediacenter/MusicTrackListDisplay.qml
+++ b/modules/gui/qt/qml/mediacenter/MusicTrackListDisplay.qml
@@ -59,6 +59,34 @@ Utils.KeyNavigableTableView {
 
     property alias parentId: rootmodel.parentId
 
+    colDelegate: Item {
+        anchors.fill: parent
+
+        property var rowModel: parent.rowModel
+        property var model: parent.colModel
+
+        Text {
+            anchors.fill:parent
+
+            text: !rowModel ? "" : (rowModel[model.criteria] || "")
+            elide: Text.ElideRight
+            font.pixelSize: VLCStyle.fontSize_normal
+            color: (model.isPrimary)? VLCStyle.colors.text : VLCStyle.colors.textInactive
+
+            anchors {
+                fill: parent
+                leftMargin: VLCStyle.margin_xsmall
+                rightMargin: VLCStyle.margin_xsmall
+            }
+            verticalAlignment: Text.AlignVCenter
+            horizontalAlignment: Text.AlignLeft
+        }
+
+
+
+
+    }
+
     onActionForSelection: {
         var list = []
         for (var i = 0; i < selection.count; i++ ) {
-- 
2.21.0



More information about the vlc-devel mailing list