forked from Shinonome/dots-hyprland
add ability to hide minute and hour hand
This commit is contained in:
@@ -198,6 +198,7 @@ Item {
|
||||
|
||||
// Hour hand
|
||||
Item {
|
||||
visible: Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true
|
||||
anchors.fill: parent
|
||||
z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1
|
||||
rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60)
|
||||
@@ -230,6 +231,7 @@ Item {
|
||||
|
||||
// Minute hand
|
||||
Item {
|
||||
visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? false : true
|
||||
anchors.fill: parent
|
||||
z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3
|
||||
rotation: -90 + (360 / 60) * root.clockMinute
|
||||
@@ -251,6 +253,7 @@ Item {
|
||||
|
||||
// Center dot
|
||||
Rectangle {
|
||||
visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" && Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true
|
||||
z: 4
|
||||
opacity: Config.options.background.clock.cookie.minuteHandStyle !== "bold" ? 1.0 : 0
|
||||
color: Config.options.background.clock.cookie.minuteHandStyle === "medium" ? root.colBackground : root.colMinuteHand
|
||||
|
||||
@@ -132,8 +132,8 @@ Singleton {
|
||||
property int clockSides: 12
|
||||
property JsonObject cookie: JsonObject {
|
||||
property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none"
|
||||
property string hourHandStyle: "fill" // Options: "fill", "stroke"
|
||||
property string minuteHandStyle: "medium" // Options: "medium", "bold"
|
||||
property string hourHandStyle: "fill" // Options: "fill", "stroke", "hide"
|
||||
property string minuteHandStyle: "medium" // Options: "medium", "bold", "hide"
|
||||
property string secondHandStyle: "dot" // Options: "dot", "line" , "none"
|
||||
property string dateStyle: "rotating" // Options: "rotating", "square", "none"
|
||||
property bool timeIndicators: true
|
||||
|
||||
@@ -170,6 +170,11 @@ ContentPage {
|
||||
displayName: Translation.tr("Bold"),
|
||||
icon: "pen_size_5",
|
||||
value: "bold"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Hide"),
|
||||
icon: "hide_image",
|
||||
value: "hide"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -223,6 +228,11 @@ ContentPage {
|
||||
displayName: Translation.tr("Stroke"),
|
||||
icon: "stroke_partial",
|
||||
value: "stroke"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Hide"),
|
||||
icon: "hide_image",
|
||||
value: "hide"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user