refactor: enhance UI components and improve theme properties for better visual consistency
This commit is contained in:
@@ -9,6 +9,39 @@ ColumnLayout {
|
||||
property alias showLabels: labelsToggle.checked
|
||||
property alias heatmapBlend: heatmapSlider.value
|
||||
|
||||
component PanelCheckBox: CheckBox {
|
||||
id: toggle
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 18
|
||||
implicitHeight: 18
|
||||
x: toggle.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: Theme.radiusXs
|
||||
color: toggle.checked ? Theme.primaryAccent : "transparent"
|
||||
border.width: Theme.borderThin
|
||||
border.color: toggle.checked ? Theme.primaryAccent : Theme.fieldBorder
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "✓"
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
color: Theme.panelBackground
|
||||
visible: toggle.checked
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: toggle.text
|
||||
color: Theme.headingColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
leftPadding: toggle.indicator.width + toggle.spacing
|
||||
font.pixelSize: toggle.font.pixelSize || 11
|
||||
}
|
||||
}
|
||||
|
||||
// ── READOUT ───────────────────────────────────────────────────────────
|
||||
Label {
|
||||
text: "READOUT"
|
||||
@@ -142,7 +175,7 @@ ColumnLayout {
|
||||
bottomPadding: 8
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
PanelCheckBox {
|
||||
id: labelsToggle
|
||||
text: "Labels"
|
||||
checked: true
|
||||
@@ -236,7 +269,7 @@ ColumnLayout {
|
||||
|
||||
Item { height: 10 }
|
||||
|
||||
CheckBox {
|
||||
PanelCheckBox {
|
||||
id: autoCheck
|
||||
text: "Auto range (mean ± 1σ)"
|
||||
checked: true
|
||||
|
||||
Reference in New Issue
Block a user