settings: remove redundant enableds

This commit is contained in:
end-4
2025-10-05 20:43:13 +02:00
parent 865e8575b2
commit d276e7b568
@@ -12,7 +12,7 @@ ContentPage {
icon: "wallpaper" icon: "wallpaper"
title: Translation.tr("Background") title: Translation.tr("Background")
ConfigRow{ ConfigRow {
ConfigSwitch { ConfigSwitch {
buttonIcon: "nest_clock_farsight_analog" buttonIcon: "nest_clock_farsight_analog"
text: Translation.tr("Show clock") text: Translation.tr("Show clock")
@@ -43,10 +43,6 @@ ContentPage {
} }
} }
ContentSubsection { ContentSubsection {
title: Translation.tr("Clock style") title: Translation.tr("Clock style")
ConfigSelectionArray { ConfigSelectionArray {
@@ -69,217 +65,205 @@ ContentPage {
} }
} }
ContentSubsection {
ConfigRow{
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
ContentSubsection { title: Translation.tr("Dial number style")
enabled: Config.options.background.clock.style === "cookie" ConfigSelectionArray {
title: Translation.tr("Dial number style") currentValue: Config.options.background.clock.cookie.dialNumberStyle
ConfigSelectionArray { onSelected: newValue => {
currentValue: Config.options.background.clock.cookie.dialNumberStyle Config.options.background.clock.cookie.dialNumberStyle = newValue;
onSelected: newValue => { if (newValue !== "dots" && newValue !== "full") {
Config.options.background.clock.cookie.dialNumberStyle = newValue; Config.options.background.clock.cookie.centerGlow = false;
if (newValue !== "dots" && newValue !== "full") { }
Config.options.background.clock.cookie.centerGlow = false; if (newValue === "numbers") {
} Config.options.background.clock.cookie.timeIndicators = false;
if (newValue === "numbers") { }
Config.options.background.clock.cookie.timeIndicators = false; if (newValue != "none") {
} Config.options.background.clock.cookie.dateInClock = false;
if (newValue != "none"){ if (Config.options.background.clock.cookie.dateStyle !== "bubble") {
Config.options.background.clock.cookie.dateInClock = false; Config.options.background.clock.cookie.dateStyle = "none";
if (Config.options.background.clock.cookie.dateStyle !== "bubble"){
Config.options.background.clock.cookie.dateStyle = "none";
}
} }
} }
options: [
{
displayName: Translation.tr("None"),
icon: "deselect",
value: "none"
},
{
displayName: Translation.tr("Dots"),
icon: "graph_6",
value: "dots"
},
{
displayName: Translation.tr("Full"),
icon: "avg_pace",
value: "full"
},
{
displayName: Translation.tr("Numbers"),
icon: "123",
value: "numbers"
}
]
} }
options: [
{
displayName: Translation.tr("None"),
icon: "deselect",
value: "none"
},
{
displayName: Translation.tr("Dots"),
icon: "graph_6",
value: "dots"
},
{
displayName: Translation.tr("Full"),
icon: "avg_pace",
value: "full"
},
{
displayName: Translation.tr("Numbers"),
icon: "123",
value: "numbers"
}
]
} }
} }
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Hour hand style")
ContentSubsection { ConfigSelectionArray {
enabled: Config.options.background.clock.style === "cookie" currentValue: Config.options.background.clock.cookie.hourHandStyle
visible: Config.options.background.clock.style === "cookie" onSelected: newValue => {
title: Translation.tr("Hour hand style") Config.options.background.clock.cookie.hourHandStyle = newValue;
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.hourHandStyle
onSelected: newValue => {
Config.options.background.clock.cookie.hourHandStyle = newValue;
}
options: [
{
displayName: Translation.tr("Classic"),
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Stroke"),
icon: "stroke_partial",
value: "stroke"
},
{
displayName: Translation.tr("Fill"),
icon: "stroke_full",
value: "fill"
},
{
displayName: Translation.tr("Hide"),
icon: "deselect",
value: "hide"
}
]
} }
} options: [
{
ContentSubsection { displayName: Translation.tr("Classic"),
enabled: Config.options.background.clock.style === "cookie" icon: "radio",
visible: Config.options.background.clock.style === "cookie" value: "classic"
title: Translation.tr("Minute hand style") },
ConfigSelectionArray { {
currentValue: Config.options.background.clock.cookie.minuteHandStyle displayName: Translation.tr("Stroke"),
onSelected: newValue => { icon: "stroke_partial",
Config.options.background.clock.cookie.minuteHandStyle = newValue; value: "stroke"
},
{
displayName: Translation.tr("Fill"),
icon: "stroke_full",
value: "fill"
},
{
displayName: Translation.tr("Hide"),
icon: "deselect",
value: "hide"
} }
options: [ ]
{
displayName: Translation.tr("Classic"),
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Thin"),
icon: "pen_size_1",
value: "thin"
},
{
displayName: Translation.tr("Medium"),
icon: "pen_size_3",
value: "medium"
},
{
displayName: Translation.tr("Bold"),
icon: "pen_size_5",
value: "bold"
},
{
displayName: Translation.tr("Hide"),
icon: "deselect",
value: "hide"
}
]
}
} }
ContentSubsection { }
enabled: Config.options.background.clock.style === "cookie"
title: Translation.tr("Seconds hand style") ContentSubsection {
visible: Config.options.background.clock.style === "cookie" visible: Config.options.background.clock.style === "cookie"
ConfigSelectionArray { title: Translation.tr("Minute hand style")
currentValue: Config.options.background.clock.cookie.secondHandStyle
onSelected: newValue => { ConfigSelectionArray {
Config.options.background.clock.cookie.secondHandStyle = newValue; currentValue: Config.options.background.clock.cookie.minuteHandStyle
onSelected: newValue => {
Config.options.background.clock.cookie.minuteHandStyle = newValue;
}
options: [
{
displayName: Translation.tr("Classic"),
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Thin"),
icon: "pen_size_1",
value: "thin"
},
{
displayName: Translation.tr("Medium"),
icon: "pen_size_3",
value: "medium"
},
{
displayName: Translation.tr("Bold"),
icon: "pen_size_5",
value: "bold"
},
{
displayName: Translation.tr("Hide"),
icon: "deselect",
value: "hide"
} }
options: [ ]
{
displayName: Translation.tr("Classic"),
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Line"),
icon: "line_end",
value: "line"
},
{
displayName: Translation.tr("Dot"),
icon: "adjust",
value: "dot"
},
{
displayName: Translation.tr("Hide"),
icon: "deselect",
value: "hide"
}
]
}
} }
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Seconds hand style")
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.secondHandStyle
ContentSubsection { onSelected: newValue => {
enabled: Config.options.background.clock.style === "cookie" Config.options.background.clock.cookie.secondHandStyle = newValue;
visible: Config.options.background.clock.style === "cookie" }
title: Translation.tr("Date style") options: [
ConfigSelectionArray { {
currentValue: Config.options.background.clock.cookie.dateStyle displayName: Translation.tr("Classic"),
onSelected: newValue => { icon: "radio",
if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none"){ value: "classic"
Config.options.background.clock.cookie.dateStyle = newValue; },
} {
if (newValue === "bubble" || newValue === "none"){ displayName: Translation.tr("Line"),
Config.options.background.clock.cookie.dateStyle = newValue; icon: "line_end",
} value: "line"
},
{
displayName: Translation.tr("Dot"),
icon: "adjust",
value: "dot"
},
{
displayName: Translation.tr("Hide"),
icon: "deselect",
value: "hide"
} }
options: [ ]
{
displayName: Translation.tr("None"),
icon: "deselect",
value: "none"
},
{
displayName: Translation.tr("Bubble"),
icon: "bubble_chart",
value: "bubble"
},
{
displayName: Translation.tr("Rotating"),
icon: "rotate_right",
value: "rotating"
},
{
displayName: Translation.tr("Square"),
icon: "square",
value: "square"
}
]
}
}
StyledText {
visible: Config.options.background.clock.style === "cookie"
Layout.leftMargin: 10
color: Appearance.colors.colSubtext
font.pixelSize: Appearance.font.pixelSize.smallie
text: Translation.tr("'Rotating' and 'Square' styles are not compatible with dial styles for aesthetic reasons")
} }
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Date style")
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.dateStyle
onSelected: newValue => {
if (newValue !== "bubble" && Config.options.background.clock.cookie.dialNumberStyle === "none") {
Config.options.background.clock.cookie.dateStyle = newValue;
}
if (newValue === "bubble" || newValue === "none") {
Config.options.background.clock.cookie.dateStyle = newValue;
}
}
options: [
{
displayName: Translation.tr("None"),
icon: "deselect",
value: "none"
},
{
displayName: Translation.tr("Bubble"),
icon: "bubble_chart",
value: "bubble"
},
{
displayName: Translation.tr("Rotating"),
icon: "rotate_right",
value: "rotating"
},
{
displayName: Translation.tr("Square"),
icon: "square",
value: "square"
}
]
}
}
StyledText {
visible: Config.options.background.clock.style === "cookie"
Layout.leftMargin: 10
color: Appearance.colors.colSubtext
font.pixelSize: Appearance.font.pixelSize.smallie
}
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: {
@@ -306,16 +289,16 @@ 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 {
} }
} }
} }
} }