vlc | branch: master | Pierre Lamot <[email protected]> | Fri Jan 3 10:15:13 2020 +0100| [e325ad646d3082daa597adcf8fcf86242a55e028] | committer: Jean-Baptiste Kempf
qml: use RoundImage in artist view rather than local implementation Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e325ad646d3082daa597adcf8fcf86242a55e028 --- .../gui/qt/medialibrary/qml/ArtistTopBanner.qml | 25 +++------------------- .../qt/medialibrary/qml/MusicArtistsDisplay.qml | 17 ++++++--------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml b/modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml index dc92fbc810..a2423c3c5a 100644 --- a/modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml +++ b/modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml @@ -67,36 +67,17 @@ Widgets.NavigableFocusScope { Layout.leftMargin: VLCStyle.margin_small Layout.rightMargin: VLCStyle.margin_small - Rectangle { - id: artistImageContainer - color: VLCStyle.colors.banner - + Widgets.RoundImage { + source: artist.cover || VLCStyle.noArtArtist height: VLCStyle.cover_xsmall width: VLCStyle.cover_xsmall + radius: VLCStyle.cover_xsmall Layout.alignment: Qt.AlignVCenter Layout.preferredHeight: VLCStyle.cover_small Layout.preferredWidth: VLCStyle.cover_small - - Image { - id: artistImage - source: artist.cover || VLCStyle.noArtArtist - fillMode: Image.PreserveAspectCrop - anchors.fill: parent - } - - layer.enabled: true - layer.effect: OpacityMask { - maskSource: Rectangle { - width: VLCStyle.cover_small - height: VLCStyle.cover_small - radius: VLCStyle.cover_small - } - } } - - Text { id: artistName text: artist.name || i18n.qtr("No artist") diff --git a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml index 5f91b2df4f..5162489328 100644 --- a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml +++ b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml @@ -51,18 +51,13 @@ Widgets.NavigableFocusScope { color: VLCStyle.colors.getBgColor(delegateModel.inSelected, this.hovered, this.activeFocus) - cover: Rectangle { - color: VLCStyle.colors.banner - width: cover_obj.width - - Image { - id: cover_obj - anchors.fill: parent - - fillMode: Image.PreserveAspectFit - source: model.cover || VLCStyle.noArtArtistSmall - } + cover: Widgets.RoundImage { + source: model.cover || VLCStyle.noArtArtistSmall + height: VLCStyle.icon_normal + width: VLCStyle.icon_normal + radius: VLCStyle.icon_normal } + line1: model.name || i18n.qtr("Unknown artist") actionButtons: [] _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
