Regenerate cache if height of each item has changed (for example,

if a smaller/bigger font is used).

This fixes a flicker issue which can occur if the font/height
of each item is changed when cached icons are present. Icons
are recached for the new height and then displayed, as if
the cache did not exist in the first place.
This commit is contained in:
speedie 2023-07-14 00:49:00 +02:00
parent 3ff3162412
commit 6ec63436d7

View file

@ -83,6 +83,10 @@ int draw_icon(struct item *item, int x, int y, int w, int h) {
}
}
if (ich != h || icw != w) {
image = NULL;
}
if (!image || !generatecache) {
image = imlib_load_image(item->image);