controlcenter: appearance pane async loader

This commit is contained in:
ATMDA 2025-11-16 13:09:09 -05:00
parent 76029cd8a0
commit 59c906d650
4 changed files with 171 additions and 150 deletions

View file

@ -22,7 +22,7 @@ Item {
function onClicked(): void {
WindowFactory.create(null, {
active: "appearance"
active: "network"
});
}
}

View file

@ -22,7 +22,7 @@ Item {
function onClicked(): void {
WindowFactory.create(null, {
active: "appearance"
active: "network"
});
}
}

View file

@ -538,9 +538,15 @@ RowLayout {
title: qsTr("Material font family")
expanded: true
StyledListView {
Loader {
Layout.fillWidth: true
Layout.preferredHeight: Math.min(contentHeight, 300)
Layout.preferredHeight: item ? Math.min(item.contentHeight, 300) : 0
asynchronous: true
active: materialFontSection.expanded
sourceComponent: StyledListView {
id: materialFontList
property alias contentHeight: materialFontList.contentHeight
clip: true
spacing: Appearance.spacing.small / 2
@ -600,15 +606,22 @@ RowLayout {
}
}
}
}
CollapsibleSection {
id: monoFontSection
title: qsTr("Monospace font family")
expanded: false
StyledListView {
Loader {
Layout.fillWidth: true
Layout.preferredHeight: Math.min(contentHeight, 300)
Layout.preferredHeight: item ? Math.min(item.contentHeight, 300) : 0
asynchronous: true
active: monoFontSection.expanded
sourceComponent: StyledListView {
id: monoFontList
property alias contentHeight: monoFontList.contentHeight
clip: true
spacing: Appearance.spacing.small / 2
@ -668,15 +681,22 @@ RowLayout {
}
}
}
}
CollapsibleSection {
id: sansFontSection
title: qsTr("Sans-serif font family")
expanded: false
StyledListView {
Loader {
Layout.fillWidth: true
Layout.preferredHeight: Math.min(contentHeight, 300)
Layout.preferredHeight: item ? Math.min(item.contentHeight, 300) : 0
asynchronous: true
active: sansFontSection.expanded
sourceComponent: StyledListView {
id: sansFontList
property alias contentHeight: sansFontList.contentHeight
clip: true
spacing: Appearance.spacing.small / 2
@ -736,6 +756,7 @@ RowLayout {
}
}
}
}
SectionContainer {
contentSpacing: Appearance.spacing.normal

View file

@ -68,7 +68,7 @@ StyledRect {
toggle: false
onClicked: {
root.visibilities.utilities = false;
root.popouts.detach("appearance");
root.popouts.detach("network");
}
}