Button: svg icon support

This commit is contained in:
o9000
2017-03-26 10:39:02 +02:00
parent a2c5553f4f
commit 0fc22b5cd6
3 changed files with 5 additions and 5 deletions

View File

@@ -572,13 +572,13 @@ void launcher_reload_icon_image(Launcher *launcher, LauncherIcon *launcherIcon)
char *new_icon_path = get_icon_path(icon_theme_wrapper, launcherIcon->icon_name, launcherIcon->icon_size, TRUE);
if (new_icon_path)
launcherIcon->image = load_image(new_icon_path, 1);
launcherIcon->image = load_image(new_icon_path, TRUE);
// On loading error, fallback to default
if (!launcherIcon->image) {
free(new_icon_path);
new_icon_path = get_icon_path(icon_theme_wrapper, DEFAULT_ICON, launcherIcon->icon_size, TRUE);
if (new_icon_path)
launcherIcon->image = imlib_load_image_immediately(new_icon_path);
launcherIcon->image = load_image(new_icon_path, TRUE);
}
Imlib_Image original = launcherIcon->image;
launcherIcon->image = scale_icon(launcherIcon->image, launcherIcon->icon_size);