From 0fc22b5cd69e139b84f99cebdc61d5bdcec2940f Mon Sep 17 00:00:00 2001 From: o9000 Date: Sun, 26 Mar 2017 10:39:02 +0200 Subject: [PATCH] Button: svg icon support --- src/button/button.c | 4 ++-- src/launcher/launcher.c | 4 ++-- src/tint.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/button/button.c b/src/button/button.c index 7151c14..01334f4 100644 --- a/src/button/button.c +++ b/src/button/button.c @@ -217,13 +217,13 @@ void button_reload_icon(Button *button) char *new_icon_path = get_icon_path(icon_theme_wrapper, button->backend->icon_name, button->frontend->iconw, TRUE); if (new_icon_path) - button->frontend->icon = imlib_load_image_immediately(new_icon_path); + button->frontend->icon = load_image(new_icon_path, TRUE); free(new_icon_path); // On loading error, fallback to default if (!button->frontend->icon) { new_icon_path = get_icon_path(icon_theme_wrapper, DEFAULT_ICON, button->frontend->iconw, TRUE); if (new_icon_path) - button->frontend->icon = imlib_load_image_immediately(new_icon_path); + button->frontend->icon = load_image(new_icon_path, TRUE); free(new_icon_path); } Imlib_Image original = button->frontend->icon; diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c index 46c22d0..d0f674f 100644 --- a/src/launcher/launcher.c +++ b/src/launcher/launcher.c @@ -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); diff --git a/src/tint.c b/src/tint.c index 00ac012..15fd259 100644 --- a/src/tint.c +++ b/src/tint.c @@ -601,7 +601,7 @@ void init_X11_post_config() for (int i = 0; data_dirs[i] != NULL; i++) { gchar *path = g_build_filename(data_dirs[i], "tint2", "default_icon.png", NULL); if (g_file_test(path, G_FILE_TEST_EXISTS)) - default_icon = imlib_load_image(path); + default_icon = load_image(path, TRUE); g_free(path); } if (!default_icon) {