mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
add new dial style
This commit is contained in:
@@ -29,6 +29,8 @@ Item {
|
||||
property real secondDotSize: 20
|
||||
property real secondsHandWidth: 2
|
||||
property real secondsHandLength: 100
|
||||
property real hourLineSize: 5
|
||||
property real minuteLineSize: 2
|
||||
|
||||
property real hourNumberSize: 36
|
||||
|
||||
@@ -413,6 +415,63 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
// Full dial style hour lines
|
||||
Repeater {
|
||||
model: 12
|
||||
Item {
|
||||
opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
required property int index
|
||||
rotation: 360 / 12 * index
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
anchors {
|
||||
left: parent.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50
|
||||
}
|
||||
Behavior on anchors.leftMargin{
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
implicitWidth: root.hourLineSize * 3.5
|
||||
implicitHeight: root.hourLineSize
|
||||
radius: implicitWidth / 2
|
||||
color: root.colOnBackground
|
||||
opacity: 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
// Full dial style minute lines
|
||||
Repeater {
|
||||
model: 60
|
||||
Item {
|
||||
opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
required property int index
|
||||
rotation: 360 / 60 * index
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
anchors {
|
||||
left: parent.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50
|
||||
}
|
||||
Behavior on anchors.leftMargin{
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
implicitWidth: root.minuteLineSize * 3.5
|
||||
implicitHeight: root.minuteLineSize
|
||||
radius: implicitWidth / 2
|
||||
color: root.colOnBackground
|
||||
opacity: 0.5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Quote
|
||||
Rectangle{
|
||||
|
||||
@@ -131,7 +131,7 @@ Singleton {
|
||||
property real scale: 1
|
||||
property int clockSides: 12
|
||||
property JsonObject cookie: JsonObject {
|
||||
property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "none"
|
||||
property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none"
|
||||
property string minuteHandStyle: "medium" // Options: "medium", "bold"
|
||||
property string secondHandStyle: "dot" // Options: "dot", "line" , "none"
|
||||
property string dateStyle: "rotating" // Options: "rotating", "square", "none"
|
||||
|
||||
@@ -101,11 +101,17 @@ ContentPage {
|
||||
icon: "graph_6",
|
||||
value: "dots"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Full"),
|
||||
icon: "avg_pace",
|
||||
value: "full"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Numbers"),
|
||||
icon: "123",
|
||||
value: "numbers"
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user