[vlc-commits] [Git][videolan/vlc][master] 9 commits: qml: remove obsolete comment
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Mon Jun 5 09:27:21 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
6aedd6f9 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: remove obsolete comment
artefact of older implementation
- - - - -
59f45e84 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: use fallbackImage in AudioGridItem
- - - - -
e4149dbb by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: use fallbackImage in artist grid item
- - - - -
f4605891 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: use fallbackImage in artist album grid item
- - - - -
432bf208 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: use fallbackImage in genre grid item
- - - - -
5ea91668 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: use fallbackImage in video grid item
- - - - -
eb10d036 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: use fallbackImage in Services Sources grid item
- - - - -
1d245296 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: use fallbackImage in TableColumns
- - - - -
e20591c3 by Prince Gupta at 2023-06-05T09:09:16+00:00
qml: release failsafe image incase we have main image
- - - - -
9 changed files:
- modules/gui/qt/medialibrary/qml/AudioGridItem.qml
- modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
- modules/gui/qt/medialibrary/qml/MusicArtist.qml
- modules/gui/qt/medialibrary/qml/MusicGenres.qml
- modules/gui/qt/medialibrary/qml/VideoGridItem.qml
- modules/gui/qt/network/qml/ServicesSources.qml
- modules/gui/qt/widgets/qml/ExpandGridView.qml
- modules/gui/qt/widgets/qml/MediaCover.qml
- modules/gui/qt/widgets/qml/TableColumns.qml
Changes:
=====================================
modules/gui/qt/medialibrary/qml/AudioGridItem.qml
=====================================
@@ -22,12 +22,15 @@ import org.videolan.medialib 0.1
import "qrc:///widgets/" as Widgets
import "qrc:///style/"
+import "qrc:///util/Helpers.js" as Helpers
Widgets.GridItem {
property var model: ({})
property int index: -1
- image: model.cover || VLCStyle.noArtAlbumCover
+ image: model.cover || ""
+ fallbackImage: VLCStyle.noArtAlbumCover
+
title: model.title || I18n.qtr("Unknown title")
subtitle: model.main_artist || I18n.qtr("Unknown artist")
pictureWidth: VLCStyle.gridCover_music_width
=====================================
modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
=====================================
@@ -87,7 +87,9 @@ MainInterface.MainViewLoader {
delegate: AudioGridItem {
id: gridItem
- image: model.cover || VLCStyle.noArtArtistSmall
+ image: model.cover || ""
+ fallbackImage: 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
=====================================
modules/gui/qt/medialibrary/qml/MusicArtist.qml
=====================================
@@ -144,7 +144,9 @@ FocusScope {
delegate: Widgets.GridItem {
id: gridItem
- image: model.cover || VLCStyle.noArtAlbumCover
+ image: model.cover || ""
+ fallbackImage: VLCStyle.noArtAlbumCover
+
title: model.title || I18n.qtr("Unknown title")
subtitle: model.release_year || ""
textAlignHCenter: true
=====================================
modules/gui/qt/medialibrary/qml/MusicGenres.qml
=====================================
@@ -126,7 +126,9 @@ MainInterface.MainViewLoader {
height: width / 2
pictureWidth: width
pictureHeight: height
- image: model.cover || VLCStyle.noArtAlbumCover
+ image: model.cover || ""
+ fallbackImage: VLCStyle.noArtAlbumCover
+
playCoverBorderWidth: VLCStyle.dp(3, VLCStyle.scale)
dragItem: genreDragItem
=====================================
modules/gui/qt/medialibrary/qml/VideoGridItem.qml
=====================================
@@ -41,7 +41,9 @@ Widgets.GridItem {
}
}
- image: model.thumbnail || VLCStyle.noArtVideoCover
+ image: model.thumbnail || ""
+ fallbackImage: VLCStyle.noArtVideoCover
+
title: model.title || I18n.qtr("Unknown title")
subtitle: model.duration.formatHMS() || ""
pictureWidth: VLCStyle.gridCover_video_width
=====================================
modules/gui/qt/network/qml/ServicesSources.qml
=====================================
@@ -65,12 +65,18 @@ MainInterface.MainGridView {
.accent(this.colorContext.accent)
.uri()
}
+
return model.artwork
- } else {
- return SVGColorImage.colorize("qrc:///sd/directory.svg")
- .color1(this.colorContext.fg.secondary)
- .uri()
}
+
+ // use fallbackImage
+ return ""
+ }
+
+ fallbackImage: {
+ return SVGColorImage.colorize("qrc:///sd/directory.svg")
+ .color1(this.colorContext.fg.secondary)
+ .uri()
}
onItemDoubleClicked: {
=====================================
modules/gui/qt/widgets/qml/ExpandGridView.qml
=====================================
@@ -595,7 +595,7 @@ FocusScope {
colorSet: ColorContext.View
}
- //Gridview visible above the expanded item
+
Flickable {
id: flickable
=====================================
modules/gui/qt/widgets/qml/MediaCover.qml
=====================================
@@ -44,7 +44,7 @@ Rectangle {
property alias source: image.source
property bool isImageReady: image.status == RoundImage.Ready
- property alias fallbackImageSource: fallbackImage.source
+ property string fallbackImageSource
property alias imageOverlay: overlay.sourceComponent
@@ -81,6 +81,10 @@ Rectangle {
radius: root.radius
visible: !root.isImageReady
+
+ // we only keep this image till there is no main image
+ // try to release the resources otherwise
+ source: !root.isImageReady ? root.fallbackImageSource : ""
}
Loader {
=====================================
modules/gui/qt/widgets/qml/TableColumns.qml
=====================================
@@ -114,8 +114,11 @@ Item {
if (!!titleDel.rowModel) {
cover = titleDel.rowModel[root.criteriaCover]
}
- return cover || titleDel.model.placeHolder || VLCStyle.noArtAlbumCover
+ return cover || ""
}
+
+ fallbackImageSource: titleDel.model.placeHolder || VLCStyle.noArtAlbumCover
+
playCoverVisible: (titleDel.currentlyFocused || titleDel.containsMouse)
playIconSize: VLCStyle.play_cover_small
onPlayIconClicked: g_mainDisplay.play(MediaLib, titleDel.rowModel.id)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/36b1865d9588c47fb2b136f367d5fb6455dd0fd0...e20591c3981f65f0736bc9dfb0e7840d71a2b0c2
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/36b1865d9588c47fb2b136f367d5fb6455dd0fd0...e20591c3981f65f0736bc9dfb0e7840d71a2b0c2
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list