mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
qml: udapte default placehoder in audio/video views
This commit is contained in:
parent
0cc1855b18
commit
6fa7da4e1b
@ -27,7 +27,7 @@ Widgets.GridItem {
|
||||
property var model: ({})
|
||||
property int index: -1
|
||||
|
||||
image: model.cover || VLCStyle.noArtAlbum
|
||||
image: model.cover || VLCStyle.noArtAlbumCover
|
||||
title: model.title || I18n.qtr("Unknown title")
|
||||
subtitle: model.main_artist || I18n.qtr("Unknown artist")
|
||||
pictureWidth: VLCStyle.gridCover_music_width
|
||||
|
@ -227,7 +227,7 @@ FocusScope {
|
||||
headerTopPadding: VLCStyle.margin_normal
|
||||
|
||||
sortModel: [
|
||||
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(2), text: I18n.qtr("Title"), headerDelegate: tableColumns.titleHeaderDelegate, colDelegate: tableColumns.titleDelegate },
|
||||
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(2), text: I18n.qtr("Title"), headerDelegate: tableColumns.titleHeaderDelegate, colDelegate: tableColumns.titleDelegate, placeHolder: VLCStyle.noArtAlbumCover },
|
||||
{ criteria: "main_artist", width: VLCStyle.colWidth(Math.max(tableView_id._nbCols - 3, 1)), text: I18n.qtr("Artist") },
|
||||
{ criteria: "duration", width:VLCStyle.colWidth(1), showSection: "", headerDelegate: tableColumns.timeHeaderDelegate, colDelegate: tableColumns.timeColDelegate },
|
||||
]
|
||||
|
@ -137,6 +137,7 @@ FocusScope {
|
||||
delegate: AudioGridItem {
|
||||
id: gridItem
|
||||
|
||||
image: model.cover || VLCStyle.noArtArtistSmall
|
||||
title: model.name || I18n.qtr("Unknown artist")
|
||||
subtitle: model.nb_tracks > 1 ? I18n.qtr("%1 songs").arg(model.nb_tracks) : I18n.qtr("%1 song").arg(model.nb_tracks)
|
||||
pictureRadius: VLCStyle.artistGridCover_radius
|
||||
@ -195,7 +196,7 @@ FocusScope {
|
||||
}
|
||||
|
||||
sortModel: [
|
||||
{ isPrimary: true, criteria: "name", width: VLCStyle.colWidth(Math.max(artistTable._nbCols - 1, 1)), text: I18n.qtr("Name"), headerDelegate: tableColumns.titleHeaderDelegate, colDelegate: tableColumns.titleDelegate },
|
||||
{ isPrimary: true, criteria: "name", width: VLCStyle.colWidth(Math.max(artistTable._nbCols - 1, 1)), text: I18n.qtr("Name"), headerDelegate: tableColumns.titleHeaderDelegate, colDelegate: tableColumns.titleDelegate, placeHolder: VLCStyle.noArtArtistSmall },
|
||||
{ criteria: "nb_tracks", width: VLCStyle.colWidth(1), text: I18n.qtr("Tracks") }
|
||||
]
|
||||
|
||||
|
@ -31,14 +31,14 @@ Widgets.KeyNavigableTableView {
|
||||
id: root
|
||||
|
||||
property var sortModelSmall: [
|
||||
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(1), text: I18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate },
|
||||
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(1), text: I18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate, placeHolder: VLCStyle.noArtAlbumCover },
|
||||
{ criteria: "album_title", width: VLCStyle.colWidth(1), text: I18n.qtr("Album"), showSection: "album_title" },
|
||||
{ criteria: "main_artist", width: VLCStyle.colWidth(1), text: I18n.qtr("Artist"), showSection: "main_artist" },
|
||||
{ criteria: "duration", width: VLCStyle.colWidth(1), text: I18n.qtr("Duration"), showSection: "", colDelegate: tableColumns.timeColDelegate, headerDelegate: tableColumns.timeHeaderDelegate },
|
||||
]
|
||||
|
||||
property var sortModelMedium: [
|
||||
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(2), text: I18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate },
|
||||
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(2), text: I18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate, placeHolder: VLCStyle.noArtAlbumCover },
|
||||
{ criteria: "album_title", width: VLCStyle.colWidth(2), text: I18n.qtr("Album"), showSection: "album_title" },
|
||||
{ criteria: "main_artist", width: VLCStyle.colWidth(1), text: I18n.qtr("Artist"), showSection: "main_artist" },
|
||||
{ criteria: "duration", width: VLCStyle.colWidth(1), text: I18n.qtr("Duration"), showSection: "", colDelegate: tableColumns.timeColDelegate, headerDelegate: tableColumns.timeHeaderDelegate },
|
||||
@ -46,7 +46,7 @@ Widgets.KeyNavigableTableView {
|
||||
|
||||
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(root._expandingColsSpan), text: I18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate },
|
||||
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(root._expandingColsSpan), text: I18n.qtr("Title"), showSection: "title", colDelegate: tableColumns.titleDelegate, headerDelegate: tableColumns.titleHeaderDelegate, placeHolder: VLCStyle.noArtAlbumCover },
|
||||
{ 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", width: VLCStyle.colWidth(1), text: I18n.qtr("Duration"), showSection: "", colDelegate: tableColumns.timeColDelegate, headerDelegate: tableColumns.timeHeaderDelegate },
|
||||
|
@ -62,7 +62,9 @@ MainInterface.MainTableView {
|
||||
type: "image",
|
||||
|
||||
headerDelegate: table.titleHeaderDelegate,
|
||||
colDelegate : table.titleDelegate
|
||||
colDelegate : table.titleDelegate,
|
||||
|
||||
placeHolder: VLCStyle.noArtAlbumCover,
|
||||
}, {
|
||||
isPrimary: true,
|
||||
|
||||
|
@ -41,7 +41,7 @@ Widgets.GridItem {
|
||||
}
|
||||
}
|
||||
|
||||
image: model.thumbnail || VLCStyle.noArtCover
|
||||
image: model.thumbnail || VLCStyle.noArtVideoCover
|
||||
title: model.title || I18n.qtr("Unknown title")
|
||||
subtitle: Helpers.msToString(model.duration) || ""
|
||||
pictureWidth: VLCStyle.gridCover_video_width
|
||||
|
@ -55,6 +55,8 @@ MainInterface.MainTableView {
|
||||
|
||||
showSection: "",
|
||||
|
||||
placeHolder: VLCStyle.noArtVideoCover,
|
||||
|
||||
headerDelegate: tableColumns.titleHeaderDelegate,
|
||||
colDelegate : tableColumns.titleDelegate,
|
||||
}, {
|
||||
|
Loading…
Reference in New Issue
Block a user