[vlc-devel] [PATCH 16/30] qml: expand tracks list to maximum width
Prince Gupta
guptaprince8832 at gmail.com
Mon Dec 14 14:27:54 CET 2020
---
modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
index 89d6955e82..374430730d 100644
--- a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
@@ -43,10 +43,11 @@ Widgets.KeyNavigableTableView {
{ criteria: "duration_short", width: VLCStyle.colWidth(1), text: i18n.qtr("Duration"), showSection: "", colDelegate: tableColumns.timeColDelegate, headerDelegate: tableColumns.timeHeaderDelegate },
]
+ readonly property int _expandingColsSpan: Math.floor((VLCStyle.gridColumnsForWidth(root.availableRowWidth) - 3 /* static cols (track_number, etc)*/) / 3)
property var sortModelLarge: [
- { isPrimary: true, criteria: "title", width: VLCStyle.colWidth(2), text: i18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate },
- { criteria: "album_title", width: VLCStyle.colWidth(2), text: i18n.qtr("Album"), showSection: "album_title" },
- { criteria: "main_artist", width: VLCStyle.colWidth(2), text: i18n.qtr("Artist"), showSection: "main_artist" },
+ { isPrimary: true, criteria: "title", width: VLCStyle.colWidth(root._expandingColsSpan), text: i18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate },
+ { criteria: "album_title", width: VLCStyle.colWidth(root._expandingColsSpan), text: i18n.qtr("Album"), showSection: "album_title" },
+ { criteria: "main_artist", width: VLCStyle.colWidth(root._expandingColsSpan), text: i18n.qtr("Artist"), showSection: "main_artist" },
{ criteria: "duration_short", width: VLCStyle.colWidth(1), text: i18n.qtr("Duration"), showSection: "", colDelegate: tableColumns.timeColDelegate, headerDelegate: tableColumns.timeHeaderDelegate },
{ criteria: "track_number",width: VLCStyle.colWidth(1), text: i18n.qtr("Track"), showSection: "" },
{ criteria: "disc_number", width: VLCStyle.colWidth(1), text: i18n.qtr("Disc"), showSection: "" },
--
2.25.1
More information about the vlc-devel
mailing list