feat: async sidebar

This commit is contained in:
2 * r + 2 * t 2026-03-20 01:24:13 +11:00
parent 1d75e9c6fc
commit 789c3fb6da
4 changed files with 6 additions and 0 deletions

View file

@ -154,6 +154,7 @@ StyledRect {
component WrappedLoader: Loader { component WrappedLoader: Loader {
required property bool shouldBeActive required property bool shouldBeActive
asynchronous: true
opacity: shouldBeActive ? 1 : 0 opacity: shouldBeActive ? 1 : 0
active: opacity > 0 active: opacity > 0

View file

@ -167,6 +167,7 @@ Item {
id: iconComp id: iconComp
IconImage { IconImage {
asynchronous: true
source: Quickshell.iconPath(action.modelData.identifier) source: Quickshell.iconPath(action.modelData.identifier)
} }
} }

View file

@ -86,6 +86,7 @@ Item {
color: "transparent" color: "transparent"
Loader { Loader {
asynchronous: true
anchors.centerIn: parent anchors.centerIn: parent
active: opacity > 0 active: opacity > 0
opacity: root.notifCount > 0 ? 0 : 1 opacity: root.notifCount > 0 ? 0 : 1
@ -166,6 +167,7 @@ Item {
} }
Loader { Loader {
asynchronous: true
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.margins: Appearance.padding.normal anchors.margins: Appearance.padding.normal

View file

@ -136,12 +136,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