style: format qml files

This commit is contained in:
tux
2026-08-24 15:44:57 +05:30
parent ca7ac0696b
commit adfd353e85
19 changed files with 500 additions and 519 deletions

View File

@@ -5,47 +5,47 @@ import qs.config
import qs.services
Rectangle {
id: root
id: root
property int barCount: 14
property real maxValue: 100
readonly property bool shouldVisualize: barCount > 0 && Cava.values.some(v => v >= 0.001)
property int barCount: 14
property real maxValue: 100
readonly property bool shouldVisualize: barCount > 0 && Cava.values.some(v => v >= 0.001)
implicitWidth: 96
implicitHeight: 32
radius: Appearance.radius
color: Appearance.colors.inActive
visible: shouldVisualize
implicitWidth: 96
implicitHeight: 32
radius: Appearance.radius
color: Appearance.colors.inActive
visible: shouldVisualize
Row {
id: barRow
Row {
id: barRow
anchors.fill: parent
anchors.margins: 8
spacing: 3
anchors.fill: parent
anchors.margins: 8
spacing: 3
Repeater {
model: root.barCount
Repeater {
model: root.barCount
Rectangle {
id: bar
Rectangle {
id: bar
required property int index
readonly property real value: Cava.values[index] ?? 0
required property int index
readonly property real value: Cava.values[index] ?? 0
width: (barRow.width - barRow.spacing * (root.barCount - 1)) / root.barCount
height: Math.max(2, (bar.value / root.maxValue) * barRow.height)
anchors.bottom: parent.bottom
radius: bar.width / 2
color: Appearance.colors.accent
antialiasing: true
width: (barRow.width - barRow.spacing * (root.barCount - 1)) / root.barCount
height: Math.max(2, (bar.value / root.maxValue) * barRow.height)
anchors.bottom: parent.bottom
radius: bar.width / 2
color: Appearance.colors.accent
antialiasing: true
Behavior on height {
NumberAnimation {
duration: Appearance.duration
}
Behavior on height {
NumberAnimation {
duration: Appearance.duration
}
}
}
}
}
}
}
}