Stop image picker thumbnail flicker

The May 17 picker performance change made activated thumbnail loads asynchronous, which undid the earlier anti-flicker fix and let carousel movement flash blank thumbnails. Keep lazy activation, but load activated thumbnails synchronously so theme/background picker navigation remains stable. Add regression coverage for the thumbnail loading mode.
This commit is contained in:
David Heinemeier Hansson
2026-06-22 17:32:56 +02:00
parent 97c4101319
commit 9a20742ea7
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -547,7 +547,7 @@ Item {
// selection moves through the carousel.
source: item.sourceActivated && item.thumbnailPath ? Util.fileUrl(item.thumbnailPath) : ""
fillMode: Image.PreserveAspectCrop
asynchronous: true
asynchronous: false
cache: true
smooth: true
}
+4
View File
@@ -47,4 +47,8 @@ assert(
/function preloadRows[\s\S]*if \(opened \|\| requestActive\) return/.test(imagePickerQml),
'image picker ignores cache preloads while a request is visible'
)
assert(
/source: item\.sourceActivated && item\.thumbnailPath \? Util\.fileUrl\(item\.thumbnailPath\) : ""[\s\S]*asynchronous: false/.test(imagePickerQml),
'image picker loads activated thumbnails synchronously to avoid carousel flicker'
)
JS