feat: async notifs and osd

This commit is contained in:
2 * r + 2 * t 2026-03-20 01:24:20 +11:00
parent 789c3fb6da
commit 344ec92cc5
2 changed files with 5 additions and 0 deletions

View file

@ -109,6 +109,7 @@ StyledRect {
Loader { Loader {
id: image id: image
asynchronous: true
active: root.hasImage active: root.hasImage
anchors.left: parent.left anchors.left: parent.left
@ -137,6 +138,7 @@ StyledRect {
Loader { Loader {
id: appIcon id: appIcon
asynchronous: true
active: root.hasAppIcon || !root.hasImage active: root.hasAppIcon || !root.hasImage
anchors.horizontalCenter: root.hasImage ? undefined : image.horizontalCenter anchors.horizontalCenter: root.hasImage ? undefined : image.horizontalCenter
@ -153,6 +155,7 @@ StyledRect {
Loader { Loader {
id: icon id: icon
asynchronous: true
active: root.hasAppIcon active: root.hasAppIcon
anchors.centerIn: parent anchors.centerIn: parent
@ -169,6 +172,7 @@ StyledRect {
} }
Loader { Loader {
asynchronous: true
active: !root.hasAppIcon active: !root.hasAppIcon
anchors.centerIn: parent anchors.centerIn: parent
anchors.horizontalCenterOffset: -Appearance.font.size.large * 0.02 anchors.horizontalCenterOffset: -Appearance.font.size.large * 0.02

View file

@ -109,6 +109,7 @@ Item {
component WrappedLoader: Loader { component WrappedLoader: Loader {
required property bool shouldBeActive required property bool shouldBeActive
asynchronous: true
Layout.preferredHeight: shouldBeActive ? Config.osd.sizes.sliderHeight : 0 Layout.preferredHeight: shouldBeActive ? Config.osd.sizes.sliderHeight : 0
opacity: shouldBeActive ? 1 : 0 opacity: shouldBeActive ? 1 : 0
active: opacity > 0 active: opacity > 0