ui/gtk/image.c

branch
newapi
changeset 275
132c7bcc6997
parent 265
3756725aeaf4
child 296
a362c76dbf99
--- a/ui/gtk/image.c	Sun Mar 31 09:58:07 2024 +0200
+++ b/ui/gtk/image.c	Sun Mar 31 16:19:01 2024 +0200
@@ -116,6 +116,13 @@
     return get_icon(name, size, 1);
 }
 
+GdkPixbuf* ui_icon_pixbuf(UiIcon *icon) {
+    if(!icon->pixbuf) {
+        GError *error = NULL;
+        icon->pixbuf = gtk_icon_info_load_icon(icon->info, &error);
+    }
+    return icon->pixbuf;
+}
 
 UiImage* ui_icon_image(UiIcon *icon) {
     GError *error = NULL;

mercurial