[ui] Increase the "cacheBuffer" value of ImageGallery's GridView

The "cacheBuffer" property determines whether delegates are retained
outside the visible area of view. In the case of the ImageGallery,
it determines whether the images that are not currently visible in
the GridView (because we need to scroll up or down to be able to see
them) will remain in the cache or not. The default value is platform-
dependent (320 for Windows) and currently causes any image that is not
directly visible to be lost, even if it was previously loaded when it
appeared in the view: if we scroll up or down, we will necessarily need
to wait for the images to be loaded again.

10000 is an arbitrary value that seems to work correctly for most cases.
This commit is contained in:
Candice Bentéjac 2022-12-05 18:57:31 +01:00
parent 9ac21d5423
commit 45bdeba343

View file

@ -157,6 +157,7 @@ Panel {
Layout.fillWidth: true
Layout.fillHeight: true
cacheBuffer: 10000 // Magic number that seems to work well, even with lots of images
visible: !intrinsicsFilterButton.checked