forked from speedie/spmenu
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:
parent
3ff3162412
commit
6ec63436d7
|
@ -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) {
|
if (!image || !generatecache) {
|
||||||
image = imlib_load_image(item->image);
|
image = imlib_load_image(item->image);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue