feat: async bar

This commit is contained in:
2 * r + 2 * t 2026-03-20 01:18:45 +11:00
parent 80b34c8c7c
commit 473e4456b0
13 changed files with 26 additions and 0 deletions

View file

@ -194,6 +194,7 @@ ColumnLayout {
return null; return null;
} }
asynchronous: true
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
// Cursed ahh thing to add padding to first and last enabled components // Cursed ahh thing to add padding to first and last enabled components

View file

@ -39,6 +39,7 @@ Item {
implicitHeight: icon.implicitHeight + current.implicitWidth + current.anchors.topMargin implicitHeight: icon.implicitHeight + current.implicitWidth + current.anchors.topMargin
Loader { Loader {
asynchronous: true
anchors.fill: parent anchors.fill: parent
active: !Config.bar.activeWindow.showOnHover active: !Config.bar.activeWindow.showOnHover

View file

@ -23,6 +23,7 @@ StyledRect {
spacing: Appearance.spacing.small spacing: Appearance.spacing.small
Loader { Loader {
asynchronous: true
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
active: Config.bar.clock.showIcon active: Config.bar.clock.showIcon

View file

@ -21,6 +21,7 @@ Item {
} }
Loader { Loader {
asynchronous: true
anchors.centerIn: parent anchors.centerIn: parent
sourceComponent: SysInfo.isDefaultLogo ? caelestiaLogo : distroIcon sourceComponent: SysInfo.isDefaultLogo ? caelestiaLogo : distroIcon
} }

View file

@ -264,6 +264,7 @@ StyledRect {
component WrappedLoader: Loader { component WrappedLoader: Loader {
required property string name required property string name
asynchronous: true
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
visible: active visible: active
} }

View file

@ -82,6 +82,8 @@ StyledRect {
Loader { Loader {
id: expandIcon id: expandIcon
asynchronous: true
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom anchors.bottom: parent.bottom

View file

@ -164,6 +164,8 @@ Item {
Loader { Loader {
id: label id: label
asynchronous: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.preferredHeight: Config.bar.sizes.innerWidth - Appearance.padding.small * 2 Layout.preferredHeight: Config.bar.sizes.innerWidth - Appearance.padding.small * 2
@ -192,6 +194,8 @@ Item {
Loader { Loader {
id: windows id: windows
asynchronous: true
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.fillHeight: true Layout.fillHeight: true
Layout.preferredHeight: implicitHeight Layout.preferredHeight: implicitHeight
@ -293,6 +297,7 @@ Item {
} }
Loader { Loader {
asynchronous: true
active: Config.bar.workspaces.activeIndicator active: Config.bar.workspaces.activeIndicator
anchors.fill: parent anchors.fill: parent

View file

@ -55,6 +55,8 @@ ColumnLayout {
Loader { Loader {
id: windows id: windows
asynchronous: true
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.fillHeight: true Layout.fillHeight: true
Layout.topMargin: -Config.bar.sizes.innerWidth / 10 Layout.topMargin: -Config.bar.sizes.innerWidth / 10

View file

@ -45,6 +45,7 @@ StyledClippingRect {
} }
Loader { Loader {
asynchronous: true
active: Config.bar.workspaces.occupiedBg active: Config.bar.workspaces.occupiedBg
anchors.fill: parent anchors.fill: parent
@ -77,6 +78,7 @@ StyledClippingRect {
} }
Loader { Loader {
asynchronous: true
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
active: Config.bar.workspaces.activeIndicator active: Config.bar.workspaces.activeIndicator
@ -110,6 +112,8 @@ StyledClippingRect {
Loader { Loader {
id: specialWs id: specialWs
asynchronous: true
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.padding.small anchors.margins: Appearance.padding.small

View file

@ -31,6 +31,7 @@ Item {
IconImage { IconImage {
id: icon id: icon
asynchronous: true
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
implicitSize: details.implicitHeight implicitSize: details.implicitHeight
source: Icons.getAppIcon(Hypr.activeToplevel?.lastIpcObject.class ?? "", "image-missing") source: Icons.getAppIcon(Hypr.activeToplevel?.lastIpcObject.class ?? "", "image-missing")

View file

@ -37,6 +37,7 @@ Column {
} }
Loader { Loader {
asynchronous: true
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
active: PowerProfiles.degradationReason !== PerformanceDegradationReason.None active: PowerProfiles.degradationReason !== PerformanceDegradationReason.None

View file

@ -142,6 +142,7 @@ ColumnLayout {
} }
Loader { Loader {
asynchronous: true
active: device.modelData.bonded active: device.modelData.bonded
sourceComponent: Item { sourceComponent: Item {
implicitWidth: connectBtn.implicitWidth implicitWidth: connectBtn.implicitWidth

View file

@ -81,6 +81,7 @@ StackView {
Loader { Loader {
id: children id: children
asynchronous: true
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
@ -114,11 +115,13 @@ StackView {
Loader { Loader {
id: icon id: icon
asynchronous: true
anchors.left: parent.left anchors.left: parent.left
active: item.modelData.icon !== "" active: item.modelData.icon !== ""
sourceComponent: IconImage { sourceComponent: IconImage {
asynchronous: true
implicitSize: label.implicitHeight implicitSize: label.implicitHeight
source: item.modelData.icon source: item.modelData.icon
@ -149,6 +152,7 @@ StackView {
Loader { Loader {
id: expand id: expand
asynchronous: true
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right anchors.right: parent.right
@ -165,6 +169,7 @@ StackView {
} }
Loader { Loader {
asynchronous: true
active: menu.isSubMenu active: menu.isSubMenu
sourceComponent: Item { sourceComponent: Item {