1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 13:08:29 -04:00

launcher: improve clipboard preview performance

related #2769
This commit is contained in:
bbedward
2026-07-06 18:15:49 -04:00
parent 6f298d3f52
commit 8a1acb63c9
5 changed files with 40 additions and 16 deletions
@@ -50,7 +50,6 @@ Rectangle {
}
readonly property bool hasClipboardPreview: item?.type === "clipboard" && item?.data?.isImage === true && (item?.data?.mimeType ?? "").startsWith("image/")
readonly property bool hasMediaPreview: previewSource.length > 0 || hasClipboardPreview
readonly property bool previewAnimated: previewSource.toLowerCase().indexOf(".gif") >= 0
readonly property string typeLabel: {
if (!item)
@@ -284,16 +283,10 @@ Rectangle {
anchors.fill: parent
source: root.previewSource
asynchronous: true
sourceSize.width: 128
sourceSize.height: 128
fillMode: Image.PreserveAspectCrop
visible: !root.hasClipboardPreview && !root.previewAnimated
}
AnimatedImage {
anchors.fill: parent
source: root.previewSource
fillMode: Image.PreserveAspectCrop
playing: visible
visible: !root.hasClipboardPreview && root.previewAnimated
visible: !root.hasClipboardPreview
}
ClipboardLauncherPreview {