forked from Shinonome/dots-hyprland
add new dial style
This commit is contained in:
@@ -29,6 +29,8 @@ Item {
|
|||||||
property real secondDotSize: 20
|
property real secondDotSize: 20
|
||||||
property real secondsHandWidth: 2
|
property real secondsHandWidth: 2
|
||||||
property real secondsHandLength: 100
|
property real secondsHandLength: 100
|
||||||
|
property real hourLineSize: 5
|
||||||
|
property real minuteLineSize: 2
|
||||||
|
|
||||||
property real hourNumberSize: 36
|
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
|
// Quote
|
||||||
Rectangle{
|
Rectangle{
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ Singleton {
|
|||||||
property real scale: 1
|
property real scale: 1
|
||||||
property int clockSides: 12
|
property int clockSides: 12
|
||||||
property JsonObject cookie: JsonObject {
|
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 minuteHandStyle: "medium" // Options: "medium", "bold"
|
||||||
property string secondHandStyle: "dot" // Options: "dot", "line" , "none"
|
property string secondHandStyle: "dot" // Options: "dot", "line" , "none"
|
||||||
property string dateStyle: "rotating" // Options: "rotating", "square", "none"
|
property string dateStyle: "rotating" // Options: "rotating", "square", "none"
|
||||||
|
|||||||
@@ -101,11 +101,17 @@ ContentPage {
|
|||||||
icon: "graph_6",
|
icon: "graph_6",
|
||||||
value: "dots"
|
value: "dots"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: Translation.tr("Full"),
|
||||||
|
icon: "avg_pace",
|
||||||
|
value: "full"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Numbers"),
|
displayName: Translation.tr("Numbers"),
|
||||||
icon: "123",
|
icon: "123",
|
||||||
value: "numbers"
|
value: "numbers"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user