refactor: enhance UI components and improve theme properties for better visual consistency

This commit is contained in:
jack
2026-06-11 13:09:04 -07:00
parent 12bd778f13
commit 1cd54e81fc
4 changed files with 80 additions and 11 deletions
+11 -7
View File
@@ -107,25 +107,29 @@ Item {
x: toggle.leftPadding
y: parent.height / 2 - height / 2
radius: Theme.radiusXs
color: toggle.checked ? Theme.primaryAccent : Theme.fieldBackground
color: toggle.checked ? Theme.primaryAccent : "transparent"
border.width: Theme.borderThin
border.color: toggle.checked ? Theme.primaryAccent : Theme.fieldBorder
Rectangle {
Text {
anchors.centerIn: parent
width: 9
height: 9
radius: Theme.radiusXs
text: "✓"
font.pixelSize: 14
font.bold: true
color: Theme.panelBackground
visible: toggle.checked
color: Theme.fieldBackground
// Small nudge to center the checkmark perfectly
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
}
contentItem: Text {
text: toggle.text
color: Theme.checkboxText
color: Theme.headingColor
verticalAlignment: Text.AlignVCenter
leftPadding: toggle.indicator.width + toggle.spacing
font.pixelSize: 13
}
}