From 470503bed33729b7050cc556609a81181727645d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 15 May 2026 18:48:20 +0200 Subject: [PATCH] Prevent flickering on theme/backgrounds selector --- .../plugins/image-picker/ImagePicker.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/default/quickshell/omarchy-shell/plugins/image-picker/ImagePicker.qml b/default/quickshell/omarchy-shell/plugins/image-picker/ImagePicker.qml index 7a0b5d60..25f5b2cd 100644 --- a/default/quickshell/omarchy-shell/plugins/image-picker/ImagePicker.qml +++ b/default/quickshell/omarchy-shell/plugins/image-picker/ImagePicker.qml @@ -370,7 +370,7 @@ Item { watchChanges: true printErrors: false onLoaded: root.loadColors(text()) - onFileChanged: { reload(); root.loadColors(text()) } + onFileChanged: reload() } function loadColors(raw) { @@ -533,9 +533,14 @@ Item { Image { id: image anchors.fill: parent - source: item.nearby ? root.fileUrl(item.thumbnailPath) : "" + // Keep a stable source while delegates move in and out of the + // nearby window. Clearing/reassigning the source on every + // selection change makes Qt tear down and reload textures, + // which shows up as flicker in both the theme and background + // selectors. + source: item.thumbnailPath ? root.fileUrl(item.thumbnailPath) : "" fillMode: Image.PreserveAspectCrop - asynchronous: true + asynchronous: false cache: true smooth: true }