wallpaperselector: Fix changes and use proper preview path

This updates the wallpaper selector to deal with the latest API changes
in the image model.
This commit is contained in:
Devin Lin 2025-12-12 22:18:44 -05:00
parent 4c76f55b5c
commit be90b3f74b

View file

@ -135,16 +135,16 @@ Controls.Drawer {
Image {
id: walliePreview
anchors.fill: parent
visible: model.path != null
visible: model.source != null
asynchronous: true
cache: false
fillMode: Image.PreserveAspectCrop
// HACK: for some reason the wallpaper preview doesn't load, just load the full image
source: model.path
source: model.preview
sourceSize: Qt.size(width * 3, height * 3)
}
}
onClicked: {
WallpaperImagePlugin.WallpaperPlugin.setHomescreenWallpaper(model.path);
WallpaperImagePlugin.WallpaperPlugin.setHomescreenWallpaper(model.source);
}
Keys.onReturnPressed: {
clicked();