forked from Shinonome/dots-hyprland
move anchors to Loader, remove unnecessary visible and move setting
This commit is contained in:
@@ -217,22 +217,20 @@ Variants {
|
|||||||
// The clock
|
// The clock
|
||||||
Loader {
|
Loader {
|
||||||
active: Config.options.background.showClock
|
active: Config.options.background.showClock
|
||||||
|
anchors {
|
||||||
|
left: wallpaper.left
|
||||||
|
top: wallpaper.top
|
||||||
|
leftMargin: bgRoot.movableXSpace + ((root.fixedClockPosition ? root.fixedClockX : bgRoot.clockX * bgRoot.effectiveWallpaperScale) - implicitWidth / 2)
|
||||||
|
topMargin: bgRoot.movableYSpace + ((root.fixedClockPosition ? root.fixedClockY : bgRoot.clockY * bgRoot.effectiveWallpaperScale) - implicitHeight / 2)
|
||||||
|
Behavior on leftMargin {
|
||||||
|
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
Behavior on topMargin {
|
||||||
|
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
id: clock
|
id: clock
|
||||||
visible: Config.options.background.show_clock
|
|
||||||
anchors {
|
|
||||||
left: wallpaper.left
|
|
||||||
top: wallpaper.top
|
|
||||||
leftMargin: bgRoot.movableXSpace + ((root.fixedClockPosition ? root.fixedClockX : bgRoot.clockX * bgRoot.effectiveWallpaperScale) - implicitWidth / 2)
|
|
||||||
topMargin: bgRoot.movableYSpace + ((root.fixedClockPosition ? root.fixedClockY : bgRoot.clockY * bgRoot.effectiveWallpaperScale) - implicitHeight / 2)
|
|
||||||
Behavior on leftMargin {
|
|
||||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
|
||||||
}
|
|
||||||
Behavior on topMargin {
|
|
||||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user