[vlc-commits] [Git][videolan/vlc][master] 4 commits: Revert "qml: show fallback image if media cover is not available in ArtworkInfoWidget"
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Sat Aug 31 06:03:33 UTC 2024
François Cartegnie pushed to branch master at VideoLAN / VLC
Commits:
a65a6963 by Fatih Uzunoglu at 2024-08-31T05:49:19+00:00
Revert "qml: show fallback image if media cover is not available in ArtworkInfoWidget"
This reverts commit 380feb815e02a580ec6f9a7bdab900b023e867d7.
- - - - -
c843d0e5 by Fatih Uzunoglu at 2024-08-31T05:49:19+00:00
Revert "qml: show fallback image if media cover is not available in PlaylistDelegate"
This reverts commit 75f95790c9c9de76cbb5dc4956df16a7d1a5b1c6.
- - - - -
cca25cde by Fatih Uzunoglu at 2024-08-31T05:49:19+00:00
qml: show fallback if image can not be loaded in PlaylistDelegate
- - - - -
059f6149 by Fatih Uzunoglu at 2024-08-31T05:49:19+00:00
qml: show fallback if image can not be loaded in ArtworkInfoWidget
- - - - -
2 changed files:
- modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
Changes:
=====================================
modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
=====================================
@@ -142,7 +142,7 @@ AbstractButton {
contentItem: RowLayout {
spacing: VLCStyle.margin_xsmall
- Widgets.MediaCover {
+ Image {
id: coverImage
Layout.fillHeight: true
@@ -152,15 +152,14 @@ AbstractButton {
if (!paintOnly && Player.artwork && Player.artwork.toString())
return VLCAccessImage.uri(Player.artwork)
else
- return ""
+ return VLCStyle.noArtAlbumCover
}
- fallbackImageSource: VLCStyle.noArtAlbumCover
+ sourceSize.height: root.height * MainCtx.screen.devicePixelRatio
- playCoverShowPlay: false
+ fillMode: Image.PreserveAspectFit
- pictureWidth: root.width
- pictureHeight: root.height
+ asynchronous: true
Accessible.role: Accessible.Graphic
Accessible.name: qsTr("Cover")
@@ -172,10 +171,16 @@ AbstractButton {
.arg(artistLabel.text)
.arg(progressIndicator.text)
+ onStatusChanged: {
+ if (source !== VLCStyle.noArtAlbumCover && status === Image.Error)
+ source = VLCStyle.noArtAlbumCover
+ }
+
Widgets.DefaultShadow {
anchors.centerIn: coverImage
sourceItem: coverImage
+
}
}
=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -162,16 +162,19 @@ T.Control {
return qsTr("Media cover")
}
- Widgets.MediaCover {
+ Widgets.ScaledImage {
id: artwork
anchors.fill: parent
- source: model.artwork ?? ""
- fallbackImageSource: VLCStyle.noArtAlbumCover
+ fillMode: Image.PreserveAspectFit
+ source: (model?.artwork.toString()) ? VLCAccessImage.uri(model.artwork) : VLCStyle.noArtAlbumCover
visible: !statusIcon.visible
- pictureWidth: parent.width
- pictureHeight: parent.height
- playCoverShowPlay: false
+ asynchronous: true
+
+ onStatusChanged: {
+ if (source !== VLCStyle.noArtAlbumCover && status === Image.Error)
+ source = VLCStyle.noArtAlbumCover
+ }
Widgets.DefaultShadow {
anchors.centerIn: parent
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ee6f241ef614f979e7ef7c468e563d15f9923e3...059f6149c913b1e44177cb1c987969bfd7c53691
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ee6f241ef614f979e7ef7c468e563d15f9923e3...059f6149c913b1e44177cb1c987969bfd7c53691
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