controlcenter: appearance pane async loader
This commit is contained in:
parent
76029cd8a0
commit
59c906d650
4 changed files with 171 additions and 150 deletions
|
|
@ -22,7 +22,7 @@ Item {
|
||||||
|
|
||||||
function onClicked(): void {
|
function onClicked(): void {
|
||||||
WindowFactory.create(null, {
|
WindowFactory.create(null, {
|
||||||
active: "appearance"
|
active: "network"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Item {
|
||||||
|
|
||||||
function onClicked(): void {
|
function onClicked(): void {
|
||||||
WindowFactory.create(null, {
|
WindowFactory.create(null, {
|
||||||
active: "appearance"
|
active: "network"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -538,9 +538,15 @@ RowLayout {
|
||||||
title: qsTr("Material font family")
|
title: qsTr("Material font family")
|
||||||
expanded: true
|
expanded: true
|
||||||
|
|
||||||
StyledListView {
|
Loader {
|
||||||
Layout.fillWidth: true
|
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
|
clip: true
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
|
|
@ -600,15 +606,22 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: monoFontSection
|
id: monoFontSection
|
||||||
title: qsTr("Monospace font family")
|
title: qsTr("Monospace font family")
|
||||||
expanded: false
|
expanded: false
|
||||||
|
|
||||||
StyledListView {
|
Loader {
|
||||||
Layout.fillWidth: true
|
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
|
clip: true
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
|
|
@ -668,15 +681,22 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: sansFontSection
|
id: sansFontSection
|
||||||
title: qsTr("Sans-serif font family")
|
title: qsTr("Sans-serif font family")
|
||||||
expanded: false
|
expanded: false
|
||||||
|
|
||||||
StyledListView {
|
Loader {
|
||||||
Layout.fillWidth: true
|
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
|
clip: true
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
|
|
@ -736,6 +756,7 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SectionContainer {
|
SectionContainer {
|
||||||
contentSpacing: Appearance.spacing.normal
|
contentSpacing: Appearance.spacing.normal
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ StyledRect {
|
||||||
toggle: false
|
toggle: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.visibilities.utilities = false;
|
root.visibilities.utilities = false;
|
||||||
root.popouts.detach("appearance");
|
root.popouts.detach("network");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue