Fix: Works regardless of scaling value

This commit is contained in:
Corey Woodworth
2025-09-27 12:34:58 -04:00
parent 9d30eac13a
commit 7dc8d2cd88
2 changed files with 15 additions and 14 deletions
+5 -4
View File
@@ -27,8 +27,8 @@ RowLayout {
Rectangle {
id: switcher
implicitWidth: Math.round(root.baseSize * 1.625 * scaling)
implicitHeight: Math.round(root.baseSize * scaling)
implicitWidth: Math.round(root.baseSize * .85 * scaling) * 2
implicitHeight: Math.round(root.baseSize * scaling * .5) * 2
radius: height * 0.5
color: root.checked ? Color.mPrimary : Color.mSurface
border.color: Color.mOutline
@@ -47,8 +47,9 @@ RowLayout {
}
Rectangle {
implicitWidth: Math.round((root.baseSize * 0.8) * scaling)
height: parent.height - (4 * scaling)
implicitWidth: Math.round(root.baseSize * 0.4 * scaling) * 2
implicitHeight: Math.round(root.baseSize * 0.4 * scaling) * 2
radius: height * 0.5
color: root.checked ? Color.mOnPrimary : Color.mPrimary
border.color: root.checked ? Color.mSurface : Color.mSurface