settings: remove redundant enableds

This commit is contained in:
end-4
2025-10-05 20:43:13 +02:00
parent 865e8575b2
commit d276e7b568
@@ -43,10 +43,6 @@ ContentPage {
} }
} }
ContentSubsection { ContentSubsection {
title: Translation.tr("Clock style") title: Translation.tr("Clock style")
ConfigSelectionArray { ConfigSelectionArray {
@@ -69,11 +65,8 @@ ContentPage {
} }
} }
ConfigRow{
visible: Config.options.background.clock.style === "cookie"
ContentSubsection { ContentSubsection {
enabled: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Dial number style") title: Translation.tr("Dial number style")
ConfigSelectionArray { ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.dialNumberStyle currentValue: Config.options.background.clock.cookie.dialNumberStyle
@@ -113,18 +106,14 @@ ContentPage {
icon: "123", icon: "123",
value: "numbers" value: "numbers"
} }
] ]
} }
} }
}
ContentSubsection { ContentSubsection {
enabled: Config.options.background.clock.style === "cookie"
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Hour hand style") title: Translation.tr("Hour hand style")
ConfigSelectionArray { ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.hourHandStyle currentValue: Config.options.background.clock.cookie.hourHandStyle
onSelected: newValue => { onSelected: newValue => {
@@ -156,9 +145,9 @@ ContentPage {
} }
ContentSubsection { ContentSubsection {
enabled: Config.options.background.clock.style === "cookie"
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Minute hand style") title: Translation.tr("Minute hand style")
ConfigSelectionArray { ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.minuteHandStyle currentValue: Config.options.background.clock.cookie.minuteHandStyle
onSelected: newValue => { onSelected: newValue => {
@@ -193,10 +182,11 @@ ContentPage {
] ]
} }
} }
ContentSubsection { ContentSubsection {
enabled: Config.options.background.clock.style === "cookie"
title: Translation.tr("Seconds hand style")
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Seconds hand style")
ConfigSelectionArray { ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.secondHandStyle currentValue: Config.options.background.clock.cookie.secondHandStyle
onSelected: newValue => { onSelected: newValue => {
@@ -223,18 +213,14 @@ ContentPage {
icon: "deselect", icon: "deselect",
value: "hide" value: "hide"
} }
] ]
} }
} }
ContentSubsection { ContentSubsection {
enabled: Config.options.background.clock.style === "cookie"
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Date style") title: Translation.tr("Date style")
ConfigSelectionArray { ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.dateStyle currentValue: Config.options.background.clock.cookie.dateStyle
onSelected: newValue => { onSelected: newValue => {
@@ -269,17 +255,15 @@ ContentPage {
] ]
} }
} }
StyledText { StyledText {
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
Layout.leftMargin: 10 Layout.leftMargin: 10
color: Appearance.colors.colSubtext color: Appearance.colors.colSubtext
font.pixelSize: Appearance.font.pixelSize.smallie font.pixelSize: Appearance.font.pixelSize.smallie
text: Translation.tr("'Rotating' and 'Square' styles are not compatible with dial styles for aesthetic reasons")
} }
ConfigSpinBox { ConfigSpinBox {
enabled: Config.options.background.clock.style === "cookie"
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
icon: "support" icon: "support"
text: Translation.tr("Clock sides") text: Translation.tr("Clock sides")
@@ -293,9 +277,8 @@ ContentPage {
} }
ConfigSwitch { ConfigSwitch {
enabled: Config.options.background.clock.style === "cookie"
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
buttonIcon: "waves" buttonIcon: "autoplay"
text: Translation.tr("Constantly rotate") text: Translation.tr("Constantly rotate")
checked: Config.options.background.clock.cookie.constantlyRotate checked: Config.options.background.clock.cookie.constantlyRotate
onCheckedChanged: { onCheckedChanged: {
@@ -307,15 +290,15 @@ ContentPage {
} }
ConfigRow { ConfigRow {
enabled: Config.options.background.clock.style === "cookie"
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
ConfigSwitch { ConfigSwitch {
enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full" enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full"
buttonIcon: "brightness_7" buttonIcon: "brightness_7"
text: Translation.tr("Center glow") text: Translation.tr("Center glow")
checked: Config.options.background.clock.cookie.centerGlow checked: Config.options.background.clock.cookie.centerGlow
onEnabledChanged: { onEnabledChanged: {
checked = Config.options.background.clock.cookie.centerGlow checked = Config.options.background.clock.cookie.centerGlow;
} }
onCheckedChanged: { onCheckedChanged: {
Config.options.background.clock.cookie.centerGlow = checked; Config.options.background.clock.cookie.centerGlow = checked;
@@ -326,13 +309,12 @@ ContentPage {
} }
ConfigSwitch { ConfigSwitch {
enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers" visible: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers"
visible: Config.options.background.clock.style === "cookie"
buttonIcon: "farsight_digital" buttonIcon: "farsight_digital"
text: Translation.tr("Clock indicator") text: Translation.tr("Clock indicator")
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;
} }
onCheckedChanged: { onCheckedChanged: {
Config.options.background.clock.cookie.timeIndicators = checked; Config.options.background.clock.cookie.timeIndicators = checked;
@@ -341,10 +323,8 @@ ContentPage {
text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons" text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons"
} }
} }
} }
ContentSubsection { ContentSubsection {
title: Translation.tr("Quote settings") title: Translation.tr("Quote settings")
MaterialTextArea { MaterialTextArea {
@@ -424,7 +404,9 @@ ContentPage {
font.pixelSize: Appearance.font.pixelSize.smallie font.pixelSize: Appearance.font.pixelSize.smallie
text: Translation.tr("Press Super+G to toggle appearance") text: Translation.tr("Press Super+G to toggle appearance")
} }
Item { Layout.fillWidth: true } Item {
Layout.fillWidth: true
}
RippleButtonWithIcon { RippleButtonWithIcon {
id: editorButton id: editorButton
buttonRadius: Appearance.rounding.full buttonRadius: Appearance.rounding.full
@@ -567,8 +549,6 @@ ContentPage {
Config.options.lock.blur.extraZoom = value / 100; Config.options.lock.blur.extraZoom = value / 100;
} }
} }
} }
} }
@@ -776,5 +756,4 @@ ContentPage {
} }
} }
} }
} }