summaryrefslogtreecommitdiff
path: root/modules/controlcenter/appearance/AppearancePane.qml
diff options
context:
space:
mode:
authorATMDA <atdma2600@gmail.com>2025-11-20 10:42:48 -0500
committerATMDA <atdma2600@gmail.com>2025-11-20 10:42:48 -0500
commit0029f2d48a67f838f1ca77055625a6dbfd88686e (patch)
tree3a49e6676dcc8ff268850972ca19abd70d624660 /modules/controlcenter/appearance/AppearancePane.qml
parentbackground: enable asynchronous loading for background component (diff)
downloadcaelestia-shell-0029f2d48a67f838f1ca77055625a6dbfd88686e.tar.gz
caelestia-shell-0029f2d48a67f838f1ca77055625a6dbfd88686e.tar.bz2
caelestia-shell-0029f2d48a67f838f1ca77055625a6dbfd88686e.zip
controlcenter: wallpaper now uses gridview, removed custom lazy loading
Diffstat (limited to 'modules/controlcenter/appearance/AppearancePane.qml')
-rw-r--r--modules/controlcenter/appearance/AppearancePane.qml74
1 files changed, 26 insertions, 48 deletions
diff --git a/modules/controlcenter/appearance/AppearancePane.qml b/modules/controlcenter/appearance/AppearancePane.qml
index aea0085..b6acbe5 100644
--- a/modules/controlcenter/appearance/AppearancePane.qml
+++ b/modules/controlcenter/appearance/AppearancePane.qml
@@ -79,71 +79,49 @@ Item {
Component {
id: appearanceRightContentComponent
- StyledFlickable {
+ Item {
id: rightAppearanceFlickable
- flickableDirection: Flickable.VerticalFlick
- contentHeight: contentLayout.height
-
- StyledScrollBar.vertical: StyledScrollBar {
- flickable: rightAppearanceFlickable
- }
ColumnLayout {
id: contentLayout
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- spacing: Appearance.spacing.normal
-
- SettingsHeader {
- icon: "palette"
- title: qsTr("Appearance Settings")
- }
+ anchors.fill: parent
+ spacing: 0
StyledText {
- Layout.topMargin: Appearance.spacing.large
Layout.alignment: Qt.AlignHCenter
+ Layout.bottomMargin: Appearance.spacing.normal
text: qsTr("Wallpaper")
font.pointSize: Appearance.font.size.extraLarge
font.weight: 600
}
- StyledText {
- Layout.alignment: Qt.AlignHCenter
- text: qsTr("Select a wallpaper")
- font.pointSize: Appearance.font.size.normal
- color: Colours.palette.m3onSurfaceVariant
- }
-
- Item {
+ Loader {
+ id: wallpaperLoader
+
Layout.fillWidth: true
- Layout.topMargin: Appearance.spacing.large
- Layout.preferredHeight: wallpaperLoader.item ? wallpaperLoader.item.layoutPreferredHeight : 0
+ Layout.fillHeight: true
+ Layout.bottomMargin: -Appearance.padding.large * 2
- Loader {
- id: wallpaperLoader
- anchors.fill: parent
- asynchronous: true
- active: {
- const isActive = root.session.activeIndex === 3;
- const isAdjacent = Math.abs(root.session.activeIndex - 3) === 1;
- const splitLayout = root.children[0];
- const loader = splitLayout && splitLayout.rightLoader ? splitLayout.rightLoader : null;
- const shouldActivate = loader && loader.item !== null && (isActive || isAdjacent);
- return shouldActivate;
- }
-
- onStatusChanged: {
- if (status === Loader.Error) {
- console.error("[AppearancePane] Wallpaper loader error!");
- }
- }
-
- sourceComponent: WallpaperGrid {
- session: root.session
+ asynchronous: true
+ active: {
+ const isActive = root.session.activeIndex === 3;
+ const isAdjacent = Math.abs(root.session.activeIndex - 3) === 1;
+ const splitLayout = root.children[0];
+ const loader = splitLayout && splitLayout.rightLoader ? splitLayout.rightLoader : null;
+ const shouldActivate = loader && loader.item !== null && (isActive || isAdjacent);
+ return shouldActivate;
+ }
+
+ onStatusChanged: {
+ if (status === Loader.Error) {
+ console.error("[AppearancePane] Wallpaper loader error!");
}
}
+
+ sourceComponent: WallpaperGrid {
+ session: root.session
+ }
}
}
}