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,49 @@
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 int hours: 12
property int numbers: 4
property int fontSize: 80
Repeater {
model: root.numbers
Item {
id: numberItem
required property int index
rotation: 360 / root.numbers * (index + 1)
anchors.fill: parent
Item {
implicitWidth: root.numberSize
implicitHeight: implicitWidth
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
topMargin: root.margins
}
StyledText {
color: root.color
anchors.centerIn: parent
text: root.hours / root.numbers * (numberItem.index + 1)
rotation: -numberItem.rotation
font {
family: Appearance.font.family.reading
pixelSize: root.fontSize
weight: Font.Black
}
}
}
}
}
}