[vlc-commits] [Git][videolan/vlc][master] 6 commits: qml: limit image size in ArtistTopBanner

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sat Oct 8 11:44:30 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
c5e6f836 by Fatih Uzunoglu at 2022-10-08T11:32:34+00:00
qml: limit image size in ArtistTopBanner

- - - - -
912fa84d by Fatih Uzunoglu at 2022-10-08T11:32:34+00:00
qml: enable mipmapping in ArtistTopBanner image

- - - - -
1f3ede1b by Fatih Uzunoglu at 2022-10-08T11:32:34+00:00
qml: fix image visibility in ArtistTopBanner

- - - - -
f5156782 by Fatih Uzunoglu at 2022-10-08T11:32:34+00:00
qml: use FastBlur in ArtistTopBanner

- - - - -
3b588190 by Fatih Uzunoglu at 2022-10-08T11:32:34+00:00
qml: some layout adjustments in ArtistTopBanner

- - - - -
d7721bdd by Fatih Uzunoglu at 2022-10-08T11:32:34+00:00
qml: disable unnecessary clipping in ArtistTopBanner

- - - - -


1 changed file:

- modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml
=====================================
@@ -27,13 +27,14 @@ import org.videolan.vlc 0.1
 
 import "qrc:///widgets/" as Widgets
 import "qrc:///style/"
+import "qrc:///util/Helpers.js" as Helpers
 
 FocusScope {
     id: root
 
     property var artist: ({})
 
-    height: VLCStyle.artistBanner_height
+    implicitHeight: VLCStyle.artistBanner_height
 
     function setCurrentItemFocus(reason) {
         playActionBtn.forceActiveFocus(reason);
@@ -41,12 +42,15 @@ FocusScope {
 
     Image {
         id: background
-        asynchronous: true
+        anchors.fill: parent
 
-        width: parent.width
-        height: VLCStyle.artistBanner_height
+        asynchronous: true
         source: artist.cover || VLCStyle.noArtArtist
+        sourceSize: artist.cover ? Qt.size(MainCtx.screen ? Helpers.alignUp(MainCtx.screen.availableGeometry.width, 32) : 1024, 0)
+                                 : undefined
+        mipmap: !!artist.cover
         fillMode: artist.cover ? Image.PreserveAspectCrop : Image.Tile
+        visible: false
 
         Rectangle {
             anchors.fill: background
@@ -57,11 +61,10 @@ FocusScope {
         }
     }
 
-    GaussianBlur {
+    FastBlur {
         source: background
         anchors.fill: background
         radius: VLCStyle.dp(4, VLCStyle.scale)
-        samples: (radius * 2) + 1
     }
 
     RowLayout {
@@ -71,24 +74,21 @@ FocusScope {
         anchors.topMargin: VLCStyle.margin_xxlarge
         anchors.bottomMargin: VLCStyle.margin_xxlarge
         anchors.leftMargin: VLCStyle.margin_xlarge
+
         spacing: VLCStyle.margin_normal
-        clip: true
 
         Item {
-            Layout.alignment: Qt.AlignVCenter
-            Layout.preferredHeight: VLCStyle.cover_normal
-            Layout.preferredWidth: VLCStyle.cover_normal
+            implicitHeight: VLCStyle.cover_normal
+            implicitWidth: VLCStyle.cover_normal
 
             RoundImage {
                 source: artist.cover || VLCStyle.noArtArtist
-                height: VLCStyle.cover_normal
-                width: VLCStyle.cover_normal
+                anchors.fill: parent
                 radius: VLCStyle.cover_normal
             }
 
             Rectangle {
-                height: VLCStyle.cover_normal
-                width: VLCStyle.cover_normal
+                anchors.fill: parent
                 radius: VLCStyle.cover_normal
                 color: "transparent"
                 border.width: VLCStyle.dp(1, VLCStyle.scale)
@@ -99,12 +99,13 @@ FocusScope {
         ColumnLayout {
             spacing: 0
 
-            Layout.alignment: Qt.AlignVCenter
             Layout.fillWidth: true
 
             Widgets.SubtitleLabel {
                 text: artist.name || I18n.qtr("No artist")
                 color: "white"
+
+                Layout.maximumWidth: parent.width
             }
 
             Widgets.MenuCaption {
@@ -113,6 +114,7 @@ FocusScope {
                 opacity: .6
 
                 Layout.topMargin: VLCStyle.margin_xxxsmall
+                Layout.maximumWidth: parent.width
             }
 
             Widgets.NavigableRow {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/67d9d280f7bf8bb678b8036c27f04e8793a80128...d7721bdd136fae174ac679bf0dac355fcecdabce

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/67d9d280f7bf8bb678b8036c27f04e8793a80128...d7721bdd136fae174ac679bf0dac355fcecdabce
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