[vlc-commits] [Git][videolan/vlc][master] 4 commits: qml: use fill mode preserve aspect crop in horizontal list view of music artist page

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jun 16 07:34:20 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
739acee7 by Fatih Uzunoglu at 2025-06-16T07:18:35+00:00
qml: use fill mode preserve aspect crop in horizontal list view of music artist page

This is to align with the grid views of other pages, where preserve aspect crop fill
mode is already used. Even though this is a horizontal list view, it uses the same
`GridItem` that is used in standard grid views, so the user naturally expects a
similar look here.

- - - - -
aebf1529 by Fatih Uzunoglu at 2025-06-16T07:18:35+00:00
qml: use fill mode preserve aspect crop in music artist page artists view

Normally we are not using preserve aspect crop in vertical list views, but
in this case since we want a perfect circle, we need to crop when necessary.

This is relevant for cover art that are not square.

- - - - -
81335f6a by Fatih Uzunoglu at 2025-06-16T07:18:35+00:00
qml: use fill mode preserve aspect crop in music artist page header cover

Since we want a perfect circle, we need to crop the cover art when
necessary. This is relevant for cover art that are not square.

- - - - -
97defe13 by Fatih Uzunoglu at 2025-06-16T07:18:35+00:00
qml: remove the obsolete note in `ImageExt`

Since 931e0e50, it is no longer relevant.

- - - - -


4 changed files:

- modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml
- modules/gui/qt/medialibrary/qml/MusicArtist.qml
- modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
- modules/gui/qt/widgets/qml/ImageExt.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml
=====================================
@@ -152,6 +152,7 @@ FocusScope {
                 radius: VLCStyle.cover_normal
                 borderColor: theme.border
                 borderWidth: VLCStyle.dp(1, VLCStyle.scale)
+                fillMode: Image.PreserveAspectCrop
                 readonly property real eDPR: MainCtx.effectiveDevicePixelRatio(Window.window)
             }
         }


=====================================
modules/gui/qt/medialibrary/qml/MusicArtist.qml
=====================================
@@ -206,6 +206,8 @@ FocusScope {
                             image: model.cover || ""
                             fallbackImage: VLCStyle.noArtAlbumCover
 
+                            fillMode: Image.PreserveAspectCrop
+
                             title: model.title || qsTr("Unknown title")
                             subtitle: model.release_year || ""
                             subtitleVisible: true


=====================================
modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
=====================================
@@ -187,6 +187,8 @@ T.ItemDelegate {
 
             borderWidth: VLCStyle.dp(1, VLCStyle.scale)
 
+            fillMode: Image.PreserveAspectCrop
+
             // FIXME: Qt bug (observed 6.2 and 6.8): Without an alpha node beneath the image, the image does not get rendered.
             Rectangle {
                 z: -1


=====================================
modules/gui/qt/widgets/qml/ImageExt.qml
=====================================
@@ -97,9 +97,7 @@ Item {
     // need that. This makes it feasible to use `PreserveAspectCrop`
     // in delegate, where we want to have effective batching. Note
     // that such option is still not free, because the fragment
-    // shader has to do additional calculations that way. Also note
-    // that a clip node is still necessary if radius is 0, as in
-    // that case the default image is used directly.
+    // shader has to do additional calculations that way.
     fillMode: Image.PreserveAspectFit
 
     property real radius



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/040456829c535c12c2ea1d4217615acd13b15989...97defe13cf6667a480fa2686f17ff877af008892

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/040456829c535c12c2ea1d4217615acd13b15989...97defe13cf6667a480fa2686f17ff877af008892
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