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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user