diff --git a/Modules/ControlCenter/Cards/AudioCard.qml b/Modules/ControlCenter/Cards/AudioCard.qml index 8436aa13..a4c975fe 100644 --- a/Modules/ControlCenter/Cards/AudioCard.qml +++ b/Modules/ControlCenter/Cards/AudioCard.qml @@ -9,6 +9,7 @@ import qs.Widgets NBox { id: root + property real scaling: 1.0 property real localOutputVolume: AudioService.volume property real localInputVolume: AudioService.inputVolume diff --git a/Modules/ControlCenter/Cards/SystemMonitorCard.qml b/Modules/ControlCenter/Cards/SystemMonitorCard.qml index 4e7254a3..a0772e96 100644 --- a/Modules/ControlCenter/Cards/SystemMonitorCard.qml +++ b/Modules/ControlCenter/Cards/SystemMonitorCard.qml @@ -9,6 +9,8 @@ import qs.Widgets NBox { id: root + property real scaling: 1.0 + Item { id: content anchors.fill: parent @@ -23,8 +25,8 @@ NBox { icon: "cpu-usage" flat: true contentScale: 0.8 - width: 70 * scaling height: 65 * scaling + scaling: root.scaling Layout.alignment: Qt.AlignHCenter } NCircleStat { @@ -33,8 +35,8 @@ NBox { icon: "cpu-temperature" flat: true contentScale: 0.8 - width: 70 * scaling height: 65 * scaling + scaling: root.scaling Layout.alignment: Qt.AlignHCenter } NCircleStat { @@ -42,8 +44,8 @@ NBox { icon: "memory" flat: true contentScale: 0.8 - width: 70 * scaling height: 65 * scaling + scaling: root.scaling Layout.alignment: Qt.AlignHCenter } NCircleStat { @@ -51,8 +53,8 @@ NBox { icon: "storage" flat: true contentScale: 0.8 - width: 70 * scaling height: 65 * scaling + scaling: root.scaling Layout.alignment: Qt.AlignHCenter } } diff --git a/Modules/ControlCenter/ControlCenterPanel.qml b/Modules/ControlCenter/ControlCenterPanel.qml index 19e6e30a..28e9b49b 100644 --- a/Modules/ControlCenter/ControlCenterPanel.qml +++ b/Modules/ControlCenter/ControlCenterPanel.qml @@ -63,6 +63,7 @@ NPanel { SystemMonitorCard { Layout.preferredWidth: Style.baseWidgetSize * 2.625 * scaling Layout.fillHeight: true + scaling: root.scaling } } @@ -70,6 +71,7 @@ NPanel { AudioCard { Layout.fillWidth: true Layout.preferredHeight: Math.max(120 * scaling) + scaling: root.scaling } // Bottom actions (two grouped rows of round buttons) diff --git a/Modules/OSD/OSD.qml b/Modules/OSD/OSD.qml index a4ec5701..0ba637df 100644 --- a/Modules/OSD/OSD.qml +++ b/Modules/OSD/OSD.qml @@ -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 diff --git a/Widgets/NCircleStat.qml b/Widgets/NCircleStat.qml index f6d4332d..b5cb53a0 100644 --- a/Widgets/NCircleStat.qml +++ b/Widgets/NCircleStat.qml @@ -8,6 +8,7 @@ import qs.Widgets Rectangle { id: root + property real scaling: 1.0 property real value: 0 // 0..100 (or any range visually mapped) property string icon: "" property string suffix: "%"