[vlc-commits] [Git][videolan/vlc][master] qt: fix dp calls made without scale parameter
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Aug 8 00:13:28 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
72f47ae2 by Md Suzon at 2026-08-07T23:58:32+00:00
qt: fix dp calls made without scale parameter
- - - - -
11 changed files:
- modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
- modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
- modules/gui/qt/player/qml/Player.qml
- modules/gui/qt/player/qml/SliderBar.qml
- modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
- modules/gui/qt/util/qml/GridSizeHelper.qml
- modules/gui/qt/util/qml/ViewDragAutoScrollHandler.qml
- modules/gui/qt/widgets/qml/FadingEdgeForItemView.qml
- modules/gui/qt/widgets/qml/ListViewExt.qml
- modules/gui/qt/widgets/qml/PointingTooltip.qml
- modules/gui/qt/widgets/qml/SearchBox.qml
Changes:
=====================================
modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
=====================================
@@ -155,8 +155,8 @@ MainViewLoader {
contextMenu.popup(selectionModel.selectedIndexes, globalMousePos)
}
- selectedShadow.anchors.margins: VLCStyle.dp(1) // outside border
- unselectedShadow.anchors.margins: VLCStyle.dp(1) // outside border
+ selectedShadow.anchors.margins: VLCStyle.dp(1, VLCStyle.scale) // outside border
+ unselectedShadow.anchors.margins: VLCStyle.dp(1, VLCStyle.scale) // outside border
}
}
}
=====================================
modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
=====================================
@@ -208,7 +208,7 @@ Widgets.TableViewExt {
anchors.left : parent.left
anchors.right: parent.right
- height: VLCStyle.dp(1)
+ height: VLCStyle.dp(1, VLCStyle.scale)
visible: root._item !== null
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -656,14 +656,14 @@ FocusScope {
Widgets.RoundedRectangleShadow {
color: Qt.rgba(0, 0, 0, .18)
- yOffset: VLCStyle.dp(24)
- blurRadius: VLCStyle.dp(54)
+ yOffset: VLCStyle.dp(24, VLCStyle.scale)
+ blurRadius: VLCStyle.dp(54, VLCStyle.scale)
}
Widgets.RoundedRectangleShadow {
color: Qt.rgba(0, 0, 0, .22)
- yOffset: VLCStyle.dp(5)
- blurRadius: VLCStyle.dp(14)
+ yOffset: VLCStyle.dp(5, VLCStyle.scale)
+ blurRadius: VLCStyle.dp(14, VLCStyle.scale)
}
}
}
=====================================
modules/gui/qt/player/qml/SliderBar.qml
=====================================
@@ -146,7 +146,7 @@ T.ProgressBar {
"pressControl": {
action: (position, forcePrecise) => {
control.forceActiveFocus()
- fsm._seekToPosition(position, VLCStyle.dp(4) / control.width, forcePrecise)
+ fsm._seekToPosition(position, VLCStyle.dp(4, VLCStyle.scale) / control.width, forcePrecise)
},
target: fsmHeld
}
@@ -159,7 +159,7 @@ T.ProgressBar {
transitions: ({
"moveControl": {
action: (position, forcePrecise) => {
- fsm._seekToPosition(position, VLCStyle.dp(2) / control.width, forcePrecise)
+ fsm._seekToPosition(position, VLCStyle.dp(2, VLCStyle.scale) / control.width, forcePrecise)
}
},
"releaseControl": {
=====================================
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
=====================================
@@ -271,8 +271,8 @@ T.Control {
visible: opacity > 0
opacity: 0
- blurRadius: VLCStyle.dp(9)
- yOffset: VLCStyle.dp(4)
+ blurRadius: VLCStyle.dp(9, VLCStyle.scale)
+ yOffset: VLCStyle.dp(4, VLCStyle.scale)
color: theme.accent.alpha(0.29)
}
@@ -284,7 +284,7 @@ T.Control {
anchors.fill: parent
anchors.margins: _diminished ? (parent.width / 2)
- : VLCStyle.dp(2)
+ : VLCStyle.dp(2, VLCStyle.scale)
radius: width / 2
=====================================
modules/gui/qt/util/qml/GridSizeHelper.qml
=====================================
@@ -37,8 +37,8 @@ QtObject{
// NOTE: The total text height of title and subtitle
// 1dp is added to each, to correctly represent the actual height
- readonly property int textHeight: (titleHeight ? titleHeight + titleTopMargin + VLCStyle.dp(1): 0) +
- (subtitleHeight ? subtitleHeight + subtitleTopMargin + VLCStyle.dp(1) : 0)
+ readonly property int textHeight: (titleHeight ? titleHeight + titleTopMargin + VLCStyle.dp(1, VLCStyle.scale): 0) +
+ (subtitleHeight ? subtitleHeight + subtitleTopMargin + VLCStyle.dp(1, VLCStyle.scale) : 0)
property int horizontalSpacing: nbItemPerRow === 2 ? VLCStyle.margin_large + VLCStyle.margin_xxxsmall
: (nbItemPerRow === 3 ? VLCStyle.margin_large + VLCStyle.margin_xxsmall
=====================================
modules/gui/qt/util/qml/ViewDragAutoScrollHandler.qml
=====================================
@@ -39,7 +39,7 @@ QtObject {
property int orientation: (view && view.orientation !== undefined) ? view.orientation
: Qt.Vertical
- property real margin: VLCStyle.dp(20)
+ property real margin: VLCStyle.dp(20, VLCStyle.scale)
readonly property bool scrolling: animation.running // for convenience
property alias scrollingDirection: animation.direction
@@ -60,7 +60,7 @@ QtObject {
reversingMode: SmoothedAnimation.Immediate
easing.type: Easing.OutQuad
- velocity: VLCStyle.dp(200)
+ velocity: VLCStyle.dp(200, VLCStyle.scale)
maximumEasingTime: 1000
readonly property Timer _timer: Timer {
=====================================
modules/gui/qt/widgets/qml/FadingEdgeForItemView.qml
=====================================
@@ -59,7 +59,7 @@ FadingEdge {
readonly property bool _fadeRectEnoughSize: (orientation === Qt.Vertical ? itemView.height
- : itemView.width) > (fadeSize * 2 + VLCStyle.dp(25))
+ : itemView.width) > (fadeSize * 2 + VLCStyle.dp(25, VLCStyle.scale))
readonly property rect _currentItemMappedRect: itemView.currentItem ? Qt.rect(itemView.currentItem.x - sourceX,
itemView.currentItem.y - sourceY,
=====================================
modules/gui/qt/widgets/qml/ListViewExt.qml
=====================================
@@ -258,7 +258,7 @@ ListView {
anchors.fill: parent
anchors.margins: VLCStyle.margin_small
- border.width: VLCStyle.dp(2)
+ border.width: VLCStyle.dp(2, VLCStyle.scale)
border.color: theme.accent
border.pixelAligned: (radius < Number.EPSILON)
@@ -831,7 +831,7 @@ ListView {
}
}
- implicitHeight: VLCStyle.dp(1)
+ implicitHeight: VLCStyle.dp(1, VLCStyle.scale)
visible: !!parent
color: theme.accent
=====================================
modules/gui/qt/widgets/qml/PointingTooltip.qml
=====================================
@@ -34,7 +34,7 @@ ToolTipExt {
implicitHeight: (implicitContentHeight + topPadding + bottomPadding)
x: _x
- y: _pos.y - (implicitHeight + arrowArea.implicitHeight + VLCStyle.dp(7.5))
+ y: _pos.y - (implicitHeight + arrowArea.implicitHeight + VLCStyle.dp(7.5, VLCStyle.scale))
readonly property real _x: _pos.x - (width / 2)
property point pos
=====================================
modules/gui/qt/widgets/qml/SearchBox.qml
=====================================
@@ -185,8 +185,8 @@ FocusScope {
implicitWidth: VLCStyle.widthSearchInput
- padding: VLCStyle.dp(6)
- leftPadding: padding + VLCStyle.dp(4)
+ padding: VLCStyle.dp(6, VLCStyle.scale)
+ leftPadding: padding + VLCStyle.dp(4, VLCStyle.scale)
rightPadding: leftPadding + (insideRow.visible ? insideRow.width : 0.0)
radius: clearButton.radius
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/72f47ae2083b70b7e05dc08e797d51655b8169c1
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/72f47ae2083b70b7e05dc08e797d51655b8169c1
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list