OSD: fix vertical layout

autoformat
This commit is contained in:
lysec
2025-10-11 18:18:43 +02:00
parent df6fdf3656
commit 3dff242606
5 changed files with 15 additions and 13 deletions
+5 -9
View File
@@ -348,15 +348,11 @@ Variants {
})()
property int vMarginTop: Math.max(Math.round(osdItem.radius), Math.round(Style.marginS * root.scaling))
property int balanceDelta: Math.round(Style.marginS * root.scaling)
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.fill: parent
anchors.topMargin: vMarginTop
anchors.bottomMargin: vMargin
width: (function () {
const w = parent.width - (vMargin * 2)
return (w % 2 === 0) ? w : w - 1
})()
anchors.leftMargin: vMargin
anchors.rightMargin: vMargin
anchors.bottomMargin: 0
spacing: Math.round(Style.marginS * root.scaling)
// Percentage text at top
@@ -418,7 +414,7 @@ Variants {
color: root.getIconColor()
pointSize: Style.fontSizeXL * root.scaling
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.bottomMargin: vMargin + Math.round(Style.marginM * root.scaling) + balanceDelta
Layout.bottomMargin: Math.round(Style.marginS * root.scaling)
Behavior on color {
ColorAnimation {
duration: Style.animationNormal