NToggle: finaly fixed the scaling issues

This commit is contained in:
quadbyte 2025-08-11 15:31:05 -04:00
parent 924ecb7ece
commit be4da5efaf

View file

@ -39,16 +39,16 @@ RowLayout {
Rectangle { Rectangle {
id: switcher id: switcher
width: root.baseSize * 1.625 * scaling implicitWidth: root.baseSize * 1.625 * scaling
height: root.baseSize * scaling implicitHeight: root.baseSize * scaling
radius: height * 0.5 radius: height * 0.5
color: value ? Colors.accentPrimary : Colors.surfaceVariant color: value ? Colors.accentPrimary : Colors.surfaceVariant
border.color: value ? Colors.accentPrimary : Colors.outline border.color: value ? Colors.accentPrimary : Colors.outline
border.width: Math.max(1, Style.borderMedium * scaling) border.width: Math.max(1, Style.borderMedium * scaling)
Rectangle { Rectangle {
width: (root.baseSize - 4) * scaling implicitWidth: (root.baseSize - 4) * scaling
height: (root.baseSize - 4) * scaling implicitHeight: (root.baseSize - 4) * scaling
radius: height * 0.5 radius: height * 0.5
color: Colors.surface color: Colors.surface
border.color: hovering ? Colors.textDisabled : Colors.outline border.color: hovering ? Colors.textDisabled : Colors.outline