move anchors to Loader, remove unnecessary visible and move setting

This commit is contained in:
hoovad
2025-08-27 06:04:13 +02:00
parent 2b54f64c8c
commit 1062ef9b49
2 changed files with 24 additions and 26 deletions
@@ -217,9 +217,6 @@ Variants {
// The clock // The clock
Loader { Loader {
active: Config.options.background.showClock active: Config.options.background.showClock
sourceComponent: Item {
id: clock
visible: Config.options.background.show_clock
anchors { anchors {
left: wallpaper.left left: wallpaper.left
top: wallpaper.top top: wallpaper.top
@@ -232,7 +229,8 @@ Variants {
animation: Appearance.animation.elementMove.numberAnimation.createObject(this) animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
} }
} }
sourceComponent: Item {
id: clock
implicitWidth: clockColumn.implicitWidth implicitWidth: clockColumn.implicitWidth
implicitHeight: clockColumn.implicitHeight implicitHeight: clockColumn.implicitHeight
@@ -69,6 +69,18 @@ ContentPage {
} }
} }
ContentSection {
title: Translation.tr("Background")
ConfigSwitch {
text: Translation.tr("Show clock")
checked: Config.options.background.showClock
onCheckedChanged: {
Config.options.background.showClock = checked;
}
}
}
ContentSection { ContentSection {
title: Translation.tr("Bar") title: Translation.tr("Bar")
@@ -624,16 +636,4 @@ ContentPage {
} }
} }
} }
ContentSection {
title: Translation.tr("Background")
ConfigSwitch {
text: Translation.tr("Show clock")
checked: Config.options.background.showClock
onCheckedChanged: {
Config.options.background.showClock = checked;
}
}
}
} }