forked from Shinonome/dots-hyprland
@@ -158,7 +158,8 @@ Singleton {
|
|||||||
property string placementStrategy: "leastBusy" // "free", "leastBusy", "mostBusy"
|
property string placementStrategy: "leastBusy" // "free", "leastBusy", "mostBusy"
|
||||||
property real x: 100
|
property real x: 100
|
||||||
property real y: 100
|
property real y: 100
|
||||||
property string style: "cookie" // Options: "cookie", "digital"
|
property string style: "cookie" // Options: "cookie", "digital"
|
||||||
|
property string styleLocked: "cookie" // Options: "cookie", "digital"
|
||||||
property JsonObject cookie: JsonObject {
|
property JsonObject cookie: JsonObject {
|
||||||
property bool aiStyling: false
|
property bool aiStyling: false
|
||||||
property int sides: 14
|
property int sides: 14
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ AbstractBackgroundWidget {
|
|||||||
implicitHeight: contentColumn.implicitHeight
|
implicitHeight: contentColumn.implicitHeight
|
||||||
implicitWidth: contentColumn.implicitWidth
|
implicitWidth: contentColumn.implicitWidth
|
||||||
|
|
||||||
readonly property string clockStyle: Config.options.background.widgets.clock.style
|
readonly property string clockStyle: GlobalStates.screenLocked ? Config.options.background.widgets.clock.styleLocked : Config.options.background.widgets.clock.style
|
||||||
readonly property bool forceCenter: (GlobalStates.screenLocked && Config.options.lock.centerClock)
|
readonly property bool forceCenter: (GlobalStates.screenLocked && Config.options.lock.centerClock)
|
||||||
readonly property bool shouldShow: (!Config.options.background.widgets.clock.showOnlyWhenLocked || GlobalStates.screenLocked)
|
readonly property bool shouldShow: (!Config.options.background.widgets.clock.showOnlyWhenLocked || GlobalStates.screenLocked)
|
||||||
property bool wallpaperSafetyTriggered: false
|
property bool wallpaperSafetyTriggered: false
|
||||||
|
|||||||
@@ -55,6 +55,20 @@ ContentPage {
|
|||||||
ContentSection {
|
ContentSection {
|
||||||
icon: "clock_loader_40"
|
icon: "clock_loader_40"
|
||||||
title: Translation.tr("Widget: Clock")
|
title: Translation.tr("Widget: Clock")
|
||||||
|
id: settingsClock
|
||||||
|
|
||||||
|
function stylePresent(styleName) {
|
||||||
|
if (!Config.options.background.widgets.clock.showOnlyWhenLocked && Config.options.background.widgets.clock.style === styleName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (Config.options.background.widgets.clock.styleLocked === styleName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly property bool digitalPresent: stylePresent("digital")
|
||||||
|
readonly property bool cookiePresent: stylePresent("cookie")
|
||||||
|
|
||||||
ConfigRow {
|
ConfigRow {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -107,6 +121,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
|
visible: !Config.options.background.widgets.clock.showOnlyWhenLocked
|
||||||
title: Translation.tr("Clock style")
|
title: Translation.tr("Clock style")
|
||||||
ConfigSelectionArray {
|
ConfigSelectionArray {
|
||||||
currentValue: Config.options.background.widgets.clock.style
|
currentValue: Config.options.background.widgets.clock.style
|
||||||
@@ -129,7 +144,29 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
visible: Config.options.background.widgets.clock.style === "digital"
|
title: Translation.tr("Clock style (locked)")
|
||||||
|
ConfigSelectionArray {
|
||||||
|
currentValue: Config.options.background.widgets.clock.styleLocked
|
||||||
|
onSelected: newValue => {
|
||||||
|
Config.options.background.widgets.clock.styleLocked = newValue;
|
||||||
|
}
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
displayName: Translation.tr("Digital"),
|
||||||
|
icon: "timer_10",
|
||||||
|
value: "digital"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: Translation.tr("Cookie"),
|
||||||
|
icon: "cookie",
|
||||||
|
value: "cookie"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ContentSubsection {
|
||||||
|
visible: settingsClock.digitalPresent
|
||||||
title: Translation.tr("Digital clock settings")
|
title: Translation.tr("Digital clock settings")
|
||||||
|
|
||||||
ConfigSwitch {
|
ConfigSwitch {
|
||||||
@@ -143,7 +180,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
visible: Config.options.background.widgets.clock.style === "cookie"
|
visible: settingsClock.cookiePresent
|
||||||
title: Translation.tr("Cookie clock settings")
|
title: Translation.tr("Cookie clock settings")
|
||||||
|
|
||||||
ConfigSwitch {
|
ConfigSwitch {
|
||||||
@@ -197,7 +234,7 @@ ContentPage {
|
|||||||
ConfigRow {
|
ConfigRow {
|
||||||
|
|
||||||
ConfigSwitch {
|
ConfigSwitch {
|
||||||
enabled: Config.options.background.widgets.clock.style === "cookie" && Config.options.background.widgets.clock.cookie.dialNumberStyle === "dots" || Config.options.background.widgets.clock.cookie.dialNumberStyle === "full"
|
enabled: Config.options.background.widgets.clock.cookie.dialNumberStyle === "dots" || Config.options.background.widgets.clock.cookie.dialNumberStyle === "full"
|
||||||
buttonIcon: "brightness_7"
|
buttonIcon: "brightness_7"
|
||||||
text: Translation.tr("Hour marks")
|
text: Translation.tr("Hour marks")
|
||||||
checked: Config.options.background.widgets.clock.cookie.hourMarks
|
checked: Config.options.background.widgets.clock.cookie.hourMarks
|
||||||
@@ -213,7 +250,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConfigSwitch {
|
ConfigSwitch {
|
||||||
enabled: Config.options.background.widgets.clock.style === "cookie" && Config.options.background.widgets.clock.cookie.dialNumberStyle !== "numbers"
|
enabled: Config.options.background.widgets.clock.cookie.dialNumberStyle !== "numbers"
|
||||||
buttonIcon: "timer_10"
|
buttonIcon: "timer_10"
|
||||||
text: Translation.tr("Digits in the middle")
|
text: Translation.tr("Digits in the middle")
|
||||||
checked: Config.options.background.widgets.clock.cookie.timeIndicators
|
checked: Config.options.background.widgets.clock.cookie.timeIndicators
|
||||||
@@ -231,7 +268,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
visible: Config.options.background.widgets.clock.style === "cookie"
|
visible: settingsClock.cookiePresent
|
||||||
title: Translation.tr("Dial style")
|
title: Translation.tr("Dial style")
|
||||||
ConfigSelectionArray {
|
ConfigSelectionArray {
|
||||||
currentValue: Config.options.background.widgets.clock.cookie.dialNumberStyle
|
currentValue: Config.options.background.widgets.clock.cookie.dialNumberStyle
|
||||||
@@ -270,7 +307,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
visible: Config.options.background.widgets.clock.style === "cookie"
|
visible: settingsClock.cookiePresent
|
||||||
title: Translation.tr("Hour hand")
|
title: Translation.tr("Hour hand")
|
||||||
ConfigSelectionArray {
|
ConfigSelectionArray {
|
||||||
currentValue: Config.options.background.widgets.clock.cookie.hourHandStyle
|
currentValue: Config.options.background.widgets.clock.cookie.hourHandStyle
|
||||||
@@ -303,7 +340,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
visible: Config.options.background.widgets.clock.style === "cookie"
|
visible: settingsClock.cookiePresent
|
||||||
title: Translation.tr("Minute hand")
|
title: Translation.tr("Minute hand")
|
||||||
|
|
||||||
ConfigSelectionArray {
|
ConfigSelectionArray {
|
||||||
@@ -342,7 +379,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
visible: Config.options.background.widgets.clock.style === "cookie"
|
visible: settingsClock.cookiePresent
|
||||||
title: Translation.tr("Second hand")
|
title: Translation.tr("Second hand")
|
||||||
|
|
||||||
ConfigSelectionArray {
|
ConfigSelectionArray {
|
||||||
@@ -376,7 +413,7 @@ ContentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSubsection {
|
ContentSubsection {
|
||||||
visible: Config.options.background.widgets.clock.style === "cookie"
|
visible: settingsClock.cookiePresent
|
||||||
title: Translation.tr("Date style")
|
title: Translation.tr("Date style")
|
||||||
|
|
||||||
ConfigSelectionArray {
|
ConfigSelectionArray {
|
||||||
|
|||||||
Reference in New Issue
Block a user