mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 17:54:45 +00:00
shell: Load wallpaper images asynchronously
This commit is contained in:
parent
102ff4db1b
commit
61375dc48e
1 changed files with 12 additions and 8 deletions
|
|
@ -79,17 +79,21 @@ Controls.Drawer {
|
||||||
width: PlasmaCore.Units.iconSizes.large
|
width: PlasmaCore.Units.iconSizes.large
|
||||||
height: width
|
height: width
|
||||||
icon: "view-preview"
|
icon: "view-preview"
|
||||||
visible: !walliePreview.visible
|
visible: !wallpaperPreviewLoader.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
Addons.QPixmapItem {
|
Loader {
|
||||||
id: walliePreview
|
id: wallpaperPreviewLoader
|
||||||
anchors.fill: parent
|
|
||||||
visible: model.screenshot != null
|
visible: model.screenshot != null
|
||||||
|
anchors.fill: parent
|
||||||
|
active: true
|
||||||
|
asynchronous: true
|
||||||
|
sourceComponent: Addons.QPixmapItem {
|
||||||
|
id: walliePreview
|
||||||
smooth: true
|
smooth: true
|
||||||
pixmap: model.screenshot
|
pixmap: model.screenshot
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue