Feature #669 » 0061-gtk4-Make-popup-image-to-use-natural-size.patch
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);
|
- « Previous
- 1
- 2
- Next »