feat: async lock

This commit is contained in:
2 * r + 2 * t 2026-03-20 01:04:03 +11:00
parent a39a2fcd18
commit 80b34c8c7c
5 changed files with 9 additions and 0 deletions

View file

@ -54,6 +54,7 @@ ColumnLayout {
} }
Loader { Loader {
asynchronous: true
Layout.leftMargin: Appearance.spacing.small Layout.leftMargin: Appearance.spacing.small
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter

View file

@ -162,6 +162,7 @@ ColumnLayout {
} }
component WrappedLoader: Loader { component WrappedLoader: Loader {
asynchronous: true
visible: active visible: active
} }

View file

@ -39,6 +39,7 @@ ColumnLayout {
color: "transparent" color: "transparent"
Loader { Loader {
asynchronous: true
anchors.centerIn: parent anchors.centerIn: parent
active: opacity > 0 active: opacity > 0
opacity: Notifs.list.length > 0 && !Config.lock.hideNotifs ? 0 : 1 opacity: Notifs.list.length > 0 && !Config.lock.hideNotifs ? 0 : 1

View file

@ -109,12 +109,14 @@ StyledRect {
radius: Appearance.rounding.full radius: Appearance.rounding.full
Loader { Loader {
asynchronous: true
anchors.centerIn: parent anchors.centerIn: parent
sourceComponent: root.image ? imageComp : root.appIcon ? appIconComp : materialIconComp sourceComponent: root.image ? imageComp : root.appIcon ? appIconComp : materialIconComp
} }
} }
Loader { Loader {
asynchronous: true
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
active: root.appIcon && root.image active: root.appIcon && root.image
@ -270,6 +272,7 @@ StyledRect {
} }
Loader { Loader {
asynchronous: true
Layout.fillWidth: true Layout.fillWidth: true
opacity: root.expanded ? 1 : 0 opacity: root.expanded ? 1 : 0

View file

@ -19,6 +19,7 @@ ColumnLayout {
spacing: Appearance.spacing.small spacing: Appearance.spacing.small
Loader { Loader {
asynchronous: true
Layout.topMargin: Appearance.padding.large * 2 Layout.topMargin: Appearance.padding.large * 2
Layout.bottomMargin: -Appearance.padding.large Layout.bottomMargin: -Appearance.padding.large
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
@ -71,6 +72,7 @@ ColumnLayout {
} }
Loader { Loader {
asynchronous: true
Layout.rightMargin: Appearance.padding.smaller Layout.rightMargin: Appearance.padding.smaller
active: root.width > 400 active: root.width > 400
visible: active visible: active
@ -107,6 +109,7 @@ ColumnLayout {
Loader { Loader {
id: forecastLoader id: forecastLoader
asynchronous: true
Layout.topMargin: Appearance.spacing.smaller Layout.topMargin: Appearance.spacing.smaller
Layout.bottomMargin: Appearance.padding.large * 2 Layout.bottomMargin: Appearance.padding.large * 2
Layout.fillWidth: true Layout.fillWidth: true