Project

General

Profile

Feature #669 » 0061-gtk4-Make-popup-image-to-use-natural-size.patch

S3_2 - Marko Lindqvist, 05/23/2024 02:42 AM

View differences:

client/gui-gtk-4.0/dialogs.c
/**********************************************************************//**
Popup image window
**************************************************************************/
void popup_image(const char *tag, int width, int height)
void popup_image(const char *tag, int width_discard, int height_discard)
{
struct sprite *spr = load_popup_sprite(tag);
......
GdkPixbuf *pix = sprite_get_pixbuf(spr);
GtkWidget *win = gtk_window_new();
GtkWidget *img = gtk_image_new_from_pixbuf(pix);
int width, height;
get_sprite_dimensions(spr, &width, &height);
gtk_window_set_default_size(GTK_WINDOW(win), width, height);
gtk_window_set_child(GTK_WINDOW(win), img);
gtk_widget_show(win);
(2-2/2)