forked from Shinonome/dots-hyprland
cookie clock: remove useless vars, adjust settings icons
This commit is contained in:
@@ -18,11 +18,6 @@ Item {
|
|||||||
readonly property string clockStyle: Config.options.background.clock.style
|
readonly property string clockStyle: Config.options.background.clock.style
|
||||||
|
|
||||||
property real implicitSize: 230
|
property real implicitSize: 230
|
||||||
property real hourDotSize: 12
|
|
||||||
property real hourLineSize: 4
|
|
||||||
property real minuteLineSize: 2
|
|
||||||
property real hourNumberSize: 36
|
|
||||||
property real dateSquareSize: 64
|
|
||||||
|
|
||||||
property color colShadow: Appearance.colors.colShadow
|
property color colShadow: Appearance.colors.colShadow
|
||||||
property color colBackground: Appearance.colors.colSecondaryContainer
|
property color colBackground: Appearance.colors.colSecondaryContainer
|
||||||
@@ -31,8 +26,6 @@ Item {
|
|||||||
property color colHourHand: Appearance.colors.colPrimary
|
property color colHourHand: Appearance.colors.colPrimary
|
||||||
property color colMinuteHand: Appearance.colors.colSecondary
|
property color colMinuteHand: Appearance.colors.colSecondary
|
||||||
property color colSecondHand: Appearance.colors.colTertiary
|
property color colSecondHand: Appearance.colors.colTertiary
|
||||||
property color colOnHourHand: Appearance.colors.colOnPrimary
|
|
||||||
property color colTimeIndicators: Appearance.colors.colSecondaryContainerHover
|
|
||||||
|
|
||||||
readonly property list<string> clockNumbers: DateTime.time.split(/[: ]/)
|
readonly property list<string> clockNumbers: DateTime.time.split(/[: ]/)
|
||||||
readonly property int clockHour: parseInt(clockNumbers[0]) % 12
|
readonly property int clockHour: parseInt(clockNumbers[0]) % 12
|
||||||
@@ -157,7 +150,6 @@ Item {
|
|||||||
sourceComponent: DateIndicator {
|
sourceComponent: DateIndicator {
|
||||||
color: root.colBackgroundInfo
|
color: root.colBackgroundInfo
|
||||||
style: Config.options.background.clock.cookie.dateStyle
|
style: Config.options.background.clock.cookie.dateStyle
|
||||||
dateSquareSize: root.dateSquareSize
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -9,14 +9,14 @@ import QtQuick
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
property string style: "rotating"
|
property string style: "bubble"
|
||||||
property color color: Appearance.colors.colOnSecondaryContainer
|
property color color: Appearance.colors.colOnSecondaryContainer
|
||||||
property real dateSquareSize: 64
|
property real dateSquareSize: 64
|
||||||
|
|
||||||
// Rotating date
|
// Rotating date
|
||||||
FadeLoader {
|
FadeLoader {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
shown: Config.options.background.clock.cookie.dateStyle === "rotating"
|
shown: Config.options.background.clock.cookie.dateStyle === "border"
|
||||||
sourceComponent: RotatingDate {
|
sourceComponent: RotatingDate {
|
||||||
color: root.color
|
color: root.color
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Item {
|
|||||||
readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle
|
readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle
|
||||||
readonly property bool timeIndicators: Config.options.background.clock.cookie.timeIndicators
|
readonly property bool timeIndicators: Config.options.background.clock.cookie.timeIndicators
|
||||||
|
|
||||||
property real radius: style === "rotating" ? 90 : 0
|
property real radius: style === "border" ? 90 : 0
|
||||||
Behavior on radius {
|
Behavior on radius {
|
||||||
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementResize.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ Singleton {
|
|||||||
property string hourHandStyle: "fill" // Options: "classic", "fill", "hollow", "hide"
|
property string hourHandStyle: "fill" // Options: "classic", "fill", "hollow", "hide"
|
||||||
property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide"
|
property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide"
|
||||||
property string secondHandStyle: "dot" // Options: "dot", "line" , "hide"
|
property string secondHandStyle: "dot" // Options: "dot", "line" , "hide"
|
||||||
property string dateStyle: "bubble" // Options: "rotating", "rect", "bubble" , "hide"
|
property string dateStyle: "bubble" // Options: "border", "rect", "bubble" , "hide"
|
||||||
property bool timeIndicators: true
|
property bool timeIndicators: true
|
||||||
property bool hourMarks: true
|
property bool hourMarks: true
|
||||||
property bool dateInClock: true
|
property bool dateInClock: true
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ ContentPage {
|
|||||||
title: Translation.tr("Cookie clock settings")
|
title: Translation.tr("Cookie clock settings")
|
||||||
ConfigSpinBox {
|
ConfigSpinBox {
|
||||||
visible: Config.options.background.clock.style === "cookie"
|
visible: Config.options.background.clock.style === "cookie"
|
||||||
icon: "support"
|
icon: "add_triangle"
|
||||||
text: Translation.tr("Sides")
|
text: Translation.tr("Sides")
|
||||||
value: Config.options.background.clock.cookie.sides
|
value: Config.options.background.clock.cookie.sides
|
||||||
from: 1
|
from: 1
|
||||||
@@ -106,8 +106,8 @@ ContentPage {
|
|||||||
|
|
||||||
ConfigSwitch {
|
ConfigSwitch {
|
||||||
enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers"
|
enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers"
|
||||||
buttonIcon: "farsight_digital"
|
buttonIcon: "timer_10"
|
||||||
text: Translation.tr("Clock indicator")
|
text: Translation.tr("Digits in the middle")
|
||||||
checked: Config.options.background.clock.cookie.timeIndicators
|
checked: Config.options.background.clock.cookie.timeIndicators
|
||||||
onEnabledChanged: {
|
onEnabledChanged: {
|
||||||
checked = Config.options.background.clock.cookie.timeIndicators;
|
checked = Config.options.background.clock.cookie.timeIndicators;
|
||||||
@@ -149,12 +149,12 @@ ContentPage {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Full"),
|
displayName: Translation.tr("Full"),
|
||||||
icon: "avg_pace",
|
icon: "history_toggle_off",
|
||||||
value: "full"
|
value: "full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Numbers"),
|
displayName: Translation.tr("Numbers"),
|
||||||
icon: "123",
|
icon: "counter_1",
|
||||||
value: "numbers"
|
value: "numbers"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -181,13 +181,13 @@ ContentPage {
|
|||||||
value: "classic"
|
value: "classic"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Hollow"),
|
displayName: Translation.tr("circle"),
|
||||||
icon: "stroke_partial",
|
icon: "stroke_partial",
|
||||||
value: "hollow"
|
value: "hollow"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Fill"),
|
displayName: Translation.tr("Fill"),
|
||||||
icon: "stroke_full",
|
icon: "eraser_size_5",
|
||||||
value: "fill"
|
value: "fill"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -216,17 +216,17 @@ ContentPage {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Thin"),
|
displayName: Translation.tr("Thin"),
|
||||||
icon: "pen_size_1",
|
icon: "line_end",
|
||||||
value: "thin"
|
value: "thin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Medium"),
|
displayName: Translation.tr("Medium"),
|
||||||
icon: "pen_size_3",
|
icon: "eraser_size_2",
|
||||||
value: "medium"
|
value: "medium"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Bold"),
|
displayName: Translation.tr("Bold"),
|
||||||
icon: "pen_size_5",
|
icon: "eraser_size_4",
|
||||||
value: "bold"
|
value: "bold"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -288,13 +288,13 @@ ContentPage {
|
|||||||
value: "bubble"
|
value: "bubble"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Rotating"),
|
displayName: Translation.tr("Border"),
|
||||||
icon: "rotate_right",
|
icon: "rotate_right",
|
||||||
value: "rotating"
|
value: "border"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: Translation.tr("Rect"),
|
displayName: Translation.tr("Rect"),
|
||||||
icon: "square",
|
icon: "rectangle",
|
||||||
value: "rect"
|
value: "rect"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user