mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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
|
||||
height: width
|
||||
icon: "view-preview"
|
||||
visible: !walliePreview.visible
|
||||
visible: !wallpaperPreviewLoader.visible
|
||||
}
|
||||
|
||||
Addons.QPixmapItem {
|
||||
id: walliePreview
|
||||
anchors.fill: parent
|
||||
Loader {
|
||||
id: wallpaperPreviewLoader
|
||||
visible: model.screenshot != null
|
||||
smooth: true
|
||||
pixmap: model.screenshot
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
||||
anchors.fill: parent
|
||||
active: true
|
||||
asynchronous: true
|
||||
sourceComponent: Addons.QPixmapItem {
|
||||
id: walliePreview
|
||||
smooth: true
|
||||
pixmap: model.screenshot
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue