mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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:
parent
4c76f55b5c
commit
be90b3f74b
1 changed files with 4 additions and 4 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue