[vlc-commits] [Git][videolan/vlc][master] 13 commits: Revert "qml: do not use radius if it is smaller than 4dp"

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Apr 27 17:53:50 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f15f0301 by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
Revert "qml: do not use radius if it is smaller than 4dp"

We now use SDF for rounding, it has less of a noticeable
performance impact compared to the old approach.

This reverts commit 62daad61bf8efd687bb1970a16c359733f0b73cf.

- - - - -
76fe27ba by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: increase `trackListAlbumCover_radius` to 3dp.

- - - - -
1f90759c by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: increase base image radius in `DragItem` to 3dp.

- - - - -
775786d1 by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: introduce property `button_radius` in `VLCStyle`

- - - - -
3bd0c28b by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: introduce property `radius` in `ButtonExt`

And set it to `VLCStyle.button_radius` by default.

- - - - -
210c473c by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: introduce property `radius` in `IconToolButton`

And set it to `VLCStyle.button_radius` by default.

- - - - -
4c19fcdd by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: introduce property `radius` in `TextToolButton`

And set it to `VLCStyle.button_radius` by default.

- - - - -
0acb2397 by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: use radius for the image in `PlaylistDelegate`

The value is set to `VLCStyle.listAlbumCover_radius`

- - - - -
7aeac474 by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: use backround coloring of `ImageExt` in `PlaylistDelegate`

- - - - -
301e18b8 by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: use radius for the image in album header of `MusicArtist`

- - - - -
8e1efce4 by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: introduce property `radius` in `TextFieldExt.qml`

- - - - -
67dd0141 by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: use rounding in search box

- - - - -
fba710fa by Fatih Uzunoglu at 2026-04-27T17:21:07+00:00
qml: introduce property `radius` in `ToolTipExt.qml`

And set it to 4dp by default.

- - - - -


11 changed files:

- modules/gui/qt/medialibrary/qml/MusicArtist.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/style/VLCStyle.qml
- modules/gui/qt/widgets/qml/ButtonExt.qml
- modules/gui/qt/widgets/qml/DragItem.qml
- modules/gui/qt/widgets/qml/IconToolButton.qml
- modules/gui/qt/widgets/qml/PointingTooltip.qml
- modules/gui/qt/widgets/qml/SearchBox.qml
- modules/gui/qt/widgets/qml/TextFieldExt.qml
- modules/gui/qt/widgets/qml/TextToolButton.qml
- modules/gui/qt/widgets/qml/ToolTipExt.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/MusicArtist.qml
=====================================
@@ -267,6 +267,7 @@ FocusScope {
 
                             fillMode: Image.PreserveAspectFit
 
+                            radius: VLCStyle.listAlbumCover_radius
                             asynchronous: true
                             cache: true
 


=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -22,7 +22,7 @@ import QtQuick.Templates as T
 import QtQuick.Layouts
 import QtQml.Models
 
-// import VLC.MainInterface // TODO: for vlcTick, not used for now due to Qt 6.2
+import VLC.MainInterface
 import VLC.Widgets as Widgets
 import VLC.Style
 import VLC.Playlist
@@ -48,7 +48,7 @@ T.Control {
                                                       dropAreaLayout.dragPosition.x,
                                                       dropAreaLayout.dragPosition.y)
 
-    readonly property Image artworkTextureProvider: contentItem?.artworkTextureProvider ?? null
+    readonly property Item artworkTextureProvider: contentItem?.artworkTextureProvider ?? null
 
     // Model roles:
     required property int index
@@ -150,7 +150,7 @@ T.Control {
     contentItem: RowLayout {
         spacing: 0
 
-        property alias artworkTextureProvider: artwork
+        property alias artworkTextureProvider: artwork.effectiveTextureProviderItem
 
         Item {
             id: artworkItem
@@ -171,7 +171,7 @@ T.Control {
                 return qsTr("Media cover")
             }
 
-            Widgets.ScaledImage {
+            Widgets.ImageExt {
                 id: artwork
 
                 anchors.fill: parent
@@ -180,6 +180,15 @@ T.Control {
                 visible: !statusIcon.visible
                 asynchronous: true
                 opacity: (status === Image.Ready ? 1.0 : 0.0)
+                radius: VLCStyle.listAlbumCover_radius
+                backgroundColor: theme.bg.primary
+
+                sourceSize: Qt.size(width * eDPR, height * eDPR)
+
+                // We do not want to update the DPR when it is updated, as that means reading
+                // the image from disk again. Wayland provides ceiled value initially, we keep
+                // using that and downsample using gpu in fractional scale case:
+                readonly property real eDPR: MainCtx.effectiveDevicePixelRatio(Window.window)
 
                 Behavior on opacity {
                     // WARNING: OpacityAnimator is not used because `visible` is not immediately respected in that case.
@@ -223,23 +232,6 @@ T.Control {
                     }
                 }
 
-                Rectangle {
-                    // NOTE: If the image is opaque and if there is depth buffer, this rectangle
-                    //       is not going to be painted by the graphics backend. Though, it will
-                    //       still have its own scene graph node, as well as QML item.
-                    // TODO: Investigate if using `ImageExt` just for its built-in background
-                    //       coloring is worth it.
-                    anchors.centerIn: parent
-                    anchors.alignWhenCentered: false
-                    width: parent.paintedWidth
-                    height: parent.paintedHeight
-                    z: -1
-
-                    color: theme.bg.primary
-
-                    visible: (artwork.status === Image.Ready)
-                }
-
                 Widgets.DefaultShadow {
                     visible: (artwork.status === Image.Ready)
                     z: -2


=====================================
modules/gui/qt/style/VLCStyle.qml
=====================================
@@ -90,10 +90,10 @@ QtObject {
 
     readonly property int listAlbumCover_height: MainCtx.dp(32, scale)
     readonly property int listAlbumCover_width: listAlbumCover_height * 16.0/9
-    readonly property int listAlbumCover_radius: 0
+    readonly property int listAlbumCover_radius: MainCtx.dp(3, scale)
     readonly property int trackListAlbumCover_width: MainCtx.dp(32, scale)
     readonly property int trackListAlbumCover_heigth: MainCtx.dp(32, scale)
-    readonly property int trackListAlbumCover_radius: 0
+    readonly property int trackListAlbumCover_radius: MainCtx.dp(3, scale)
 
     readonly property int tableCoverRow_height: Math.max(listAlbumCover_height, fontHeight_normal) + margin_xsmall * 2
     readonly property int tableRow_height: fontHeight_normal + margin_small * 2
@@ -170,6 +170,8 @@ QtObject {
     readonly property int button_width_normal: MainCtx.dp(96, scale)
     readonly property int button_width_large: MainCtx.dp(128, scale)
 
+    readonly property real button_radius: MainCtx.dp(4, scale)
+
     readonly property int contextButton_width: icon_normal
     readonly property int contextButton_margin: margin_xxsmall
 


=====================================
modules/gui/qt/widgets/qml/ButtonExt.qml
=====================================
@@ -45,6 +45,8 @@ T.Button {
     property color color: theme.fg.primary
     property color colorFocus: theme.visualFocus
 
+    property int radius: VLCStyle.button_radius
+
     //set to true when user animates the background manually
     property bool extBackgroundAnimation: false
 
@@ -102,6 +104,8 @@ T.Button {
         border.color: control.visualFocus ? control.colorFocus
                                           : (theme.border.a > 0.0 ? theme.border : color)
 
+        radius: control.radius
+
         Rectangle {
             anchors {
                 bottom: parent.bottom
@@ -114,6 +118,8 @@ T.Button {
 
             width: control.contentItem?.implicitWidth ?? implicitWidth
 
+            radius: parent.radius
+
             visible: (width > 0 && control.checked)
         }
     }


=====================================
modules/gui/qt/widgets/qml/DragItem.qml
=====================================
@@ -505,7 +505,7 @@ Item {
                 anchors.centerIn: parent
                 width: coverSize
                 height: coverSize
-                radius: coverRepeater.count > 1 ? dragItem.coverSize : 0.0
+                radius: coverRepeater.count > 1 ? dragItem.coverSize : VLCStyle.dp(3, VLCStyle.scale)
                 source: modelData.artwork ?? modelData.fallback ?? dragItem.defaultCover
                 sourceSize: dragItem.imageSourceSize ?? Qt.size(width * eDPR, height * eDPR)
                 textureProviderItem: modelData?.textureProvider ?? null


=====================================
modules/gui/qt/widgets/qml/IconToolButton.qml
=====================================
@@ -38,6 +38,8 @@ T.ToolButton {
 
     property color backgroundColor: theme.bg.primary
 
+    property real radius: VLCStyle.button_radius
+
     // Settings
 
     padding: 0
@@ -99,6 +101,8 @@ T.ToolButton {
         color: control.backgroundColor
 
         border.color: visualFocus ? theme.visualFocus : theme.border
+
+        radius: control.radius
     }
 
     contentItem: Widgets.IconLabel {


=====================================
modules/gui/qt/widgets/qml/PointingTooltip.qml
=====================================
@@ -25,6 +25,7 @@ ToolTipExt {
 
     margins: 0
     padding: VLCStyle.margin_xxsmall
+    radius: VLCStyle.dp(6, VLCStyle.scale)
 
     height: implicitHeight + background.arrowHeight
     bottomInset: height - implicitHeight
@@ -50,7 +51,7 @@ ToolTipExt {
     background: Rectangle {
         border.color: pointingTooltip.colorContext.border
         color: pointingTooltip.colorContext.bg.primary
-        radius: VLCStyle.dp(6, VLCStyle.scale)
+        radius: pointingTooltip.radius
 
         readonly property real arrowHeight: arrow.implicitHeight + border.width
 


=====================================
modules/gui/qt/widgets/qml/SearchBox.qml
=====================================
@@ -148,6 +148,8 @@ FocusScope {
             leftPadding: padding + VLCStyle.dp(4)
             rightPadding: (textField.width - clearButton.x)
 
+            radius: clearButton.radius
+
             selectByMouse: true
 
             placeholderText: qsTr("filter")


=====================================
modules/gui/qt/widgets/qml/TextFieldExt.qml
=====================================
@@ -43,12 +43,15 @@ TextField {
 
     verticalAlignment: Text.AlignVCenter
 
+    property real radius
+
     background: Rectangle {
         implicitWidth: 200
         implicitHeight: 40
         border.width: control.enabled ? VLCStyle.dp(2, VLCStyle.scale) : 0
         color: theme.bg.primary
         border.color: theme.border
+        radius: control.radius
     }
 
 }


=====================================
modules/gui/qt/widgets/qml/TextToolButton.qml
=====================================
@@ -34,6 +34,8 @@ T.ToolButton {
 
     padding: VLCStyle.margin_xxsmall
 
+    property real radius: VLCStyle.button_radius
+
     // Keys
 
     Keys.priority: Keys.AfterItem
@@ -69,5 +71,6 @@ T.ToolButton {
         enabled: theme.initialized
         color: theme.bg.primary
         border.color: visualFocus ? theme.visualFocus : "transparent"
+        radius: control.radius
     }
 }


=====================================
modules/gui/qt/widgets/qml/ToolTipExt.qml
=====================================
@@ -40,6 +40,8 @@ T.ToolTip {
 
     closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
 
+    property real radius: VLCStyle.dp(4, VLCStyle.scale)
+
     Component.onCompleted: {
         if (control.popupType !== undefined) {
             console.assert(typeof control.popupType === "number")
@@ -79,5 +81,6 @@ T.ToolTip {
     background: Rectangle {
         border.color: theme.border
         color: theme.bg.primary
+        radius: control.radius
     }
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/df2fc34fdc1a047cbd4509b70dff1d9e1ceb2689...fba710fac6f73440ed14a5480ae500f0282c6b87

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/df2fc34fdc1a047cbd4509b70dff1d9e1ceb2689...fba710fac6f73440ed14a5480ae500f0282c6b87
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list