forked from Shinonome/dots-hyprland
background: make switching between clock stylies less janky
This commit is contained in:
@@ -6,11 +6,13 @@ import qs.modules.common.widgets
|
|||||||
Loader {
|
Loader {
|
||||||
id: root
|
id: root
|
||||||
property bool shown: true
|
property bool shown: true
|
||||||
|
property alias fade: opacityBehavior.enabled
|
||||||
opacity: shown ? 1 : 0
|
opacity: shown ? 1 : 0
|
||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
active: opacity > 0
|
active: opacity > 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
|
id: opacityBehavior
|
||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ AbstractBackgroundWidget {
|
|||||||
id: cookieClockLoader
|
id: cookieClockLoader
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
shown: root.clockStyle === "cookie" && (root.shouldShow)
|
shown: root.clockStyle === "cookie" && (root.shouldShow)
|
||||||
|
fade: false
|
||||||
sourceComponent: Column {
|
sourceComponent: Column {
|
||||||
spacing: 10
|
spacing: 10
|
||||||
CookieClock {
|
CookieClock {
|
||||||
@@ -61,6 +62,7 @@ AbstractBackgroundWidget {
|
|||||||
id: digitalClockLoader
|
id: digitalClockLoader
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
shown: root.clockStyle === "digital" && (root.shouldShow)
|
shown: root.clockStyle === "digital" && (root.shouldShow)
|
||||||
|
fade: false
|
||||||
sourceComponent: ColumnLayout {
|
sourceComponent: ColumnLayout {
|
||||||
id: clockColumn
|
id: clockColumn
|
||||||
spacing: 6
|
spacing: 6
|
||||||
|
|||||||
Reference in New Issue
Block a user