Rearrange for tidier structure (#2212)

This commit is contained in:
clsty
2025-10-16 07:19:55 +08:00
parent 13065d7e5a
commit 8b493e091d
529 changed files with 165 additions and 138 deletions
@@ -0,0 +1,66 @@
pragma ComponentBehavior: Bound
import qs.modules.common
import qs.modules.common.widgets
import QtQuick
Item {
id: root
property real numberSize: 80
property real margins: 10
property color color: Appearance.colors.colOnSecondaryContainer
property real hourLineSize: 4
property real minuteLineSize: 2
property real hourLineLength: 18
property real minuteLineLength: 7
property int hours: 12
property int minutes: 60
// Full dial style hour lines
Repeater {
model: root.hours
Item {
required property int index
rotation: 360 / root.hours * index
anchors.fill: parent
Rectangle {
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
leftMargin: root.margins
}
implicitWidth: root.hourLineLength
implicitHeight: root.hourLineSize
radius: implicitWidth / 2
color: root.color
}
}
}
// Minute lines
Repeater {
model: root.minutes
Item {
required property int index
rotation: 360 / root.minutes * index
anchors.fill: parent
Rectangle {
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
leftMargin: root.margins
}
implicitWidth: root.minuteLineLength
implicitHeight: root.minuteLineSize
radius: implicitWidth / 2
color: root.color
}
}
}
}