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