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