--- a/ui/gtk/image.c Wed Nov 13 21:19:55 2024 +0100 +++ b/ui/gtk/image.c Wed Nov 13 22:05:52 2024 +0100 @@ -93,12 +93,12 @@ GdkPixbuf *pixbuf = value; if(pixbuf) { - int width, height; -#if GTK_CHECK_VERSION(4, 12, 0) + int width = gdk_pixbuf_get_width(pixbuf); + int height = gdk_pixbuf_get_height(pixbuf); + +#if GTK_CHECK_VERSION(4, 0, 0) GdkTexture *texture = gdk_texture_new_for_pixbuf(pixbuf); gtk_picture_set_paintable(GTK_PICTURE(g->obj), GDK_PAINTABLE(texture)); - width = gdk_texture_get_width(texture); - height = gdk_texture_get_height(texture); #else gtk_image_set_from_pixbuf(GTK_IMAGE(g->obj), pixbuf); #endif