Fixed a bunch of border.width who used to have inverted logic (math.min vs max)

This commit is contained in:
quadbyte 2025-08-10 23:52:31 -04:00
parent ff2bbe60a4
commit c7a07127d8
11 changed files with 15 additions and 17 deletions

View file

@ -14,6 +14,6 @@ Rectangle {
color: Colors.surfaceVariant
radius: Style.radiusMedium * scaling
border.color: Colors.backgroundTertiary
border.width: Math.min(1, Style.borderThin * scaling)
border.width: Math.max(1, Style.borderThin * scaling)
clip: true
}

View file

@ -13,5 +13,5 @@ Rectangle {
color: Colors.backgroundSecondary
radius: Style.radiusMedium * scaling
border.color: Colors.backgroundTertiary
border.width: Math.min(1, Style.borderThin * scaling)
border.width: Math.max(1, Style.borderThin * scaling)
}

View file

@ -21,7 +21,7 @@ Rectangle {
color: flat ? "transparent" : Colors.backgroundSecondary
radius: Style.radiusSmall * scaling
border.color: flat ? "transparent" : Colors.backgroundTertiary
border.width: flat ? 0 : Math.min(1, Style.borderThin * scaling)
border.width: flat ? 0 : Math.max(1, Style.borderThin * scaling)
clip: true
// Repaint gauge when the bound value changes
@ -90,7 +90,7 @@ Rectangle {
radius: width / 2
color: Colors.backgroundPrimary
border.color: Colors.accentPrimary
border.width: Math.min(1, Style.borderThin * scaling)
border.width: Math.max(1, Style.borderThin * scaling)
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.rightMargin: 4 * scaling * contentScale

View file

@ -83,7 +83,7 @@ Slider {
radius: width * 0.5
color: root.pressed ? Colors.surfaceVariant : Colors.surface
border.color: Colors.accentPrimary
border.width: Math.min(1, Style.borderThick * scaling)
border.width: Math.max(1, Style.borderThick * scaling)
// Press feedback halo (using accent color, low opacity)
Rectangle {
anchors.centerIn: parent

View file

@ -43,7 +43,7 @@ RowLayout {
radius: height * 0.5
color: value ? Colors.accentPrimary : Colors.surfaceVariant
border.color: value ? Colors.accentPrimary : Colors.outline
border.width: Math.min(1, Style.borderMedium * scaling)
border.width: Math.max(1, Style.borderMedium * scaling)
Rectangle {
width: (Style.baseWidgetSize - 4) * scaling
@ -51,7 +51,7 @@ RowLayout {
radius: height * 0.5
color: Colors.surface
border.color: hovering ? Colors.textDisabled : Colors.outline
border.width: Math.min(1, Style.borderMedium * scaling)
border.width: Math.max(1, Style.borderMedium * scaling)
y: 2 * scaling
x: value ? switcher.width - width - 2 * scaling : 2 * scaling

View file

@ -102,7 +102,7 @@ Window {
radius: Style.radiusMedium * scaling
color: Colors.backgroundTertiary
border.color: Colors.outline
border.width: Math.min(1, Style.borderThin * scaling)
border.width: Math.max(1, Style.borderThin * scaling)
opacity: Style.opacityFull
z: 1
}