mirror of https://github.com/GNOME/gimp.git
restrict splash image to screen size to guard us from insanely large
2004-12-13 Sven Neumann <sven@gimp.org> * app/gui/splash.c: restrict splash image to screen size to guard us from insanely large splash images.
This commit is contained in:
parent
44a7132848
commit
4f76089e26
|
@ -1,3 +1,8 @@
|
|||
2004-12-13 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/splash.c: restrict splash image to screen size to guard us
|
||||
from insanely large splash images.
|
||||
|
||||
2004-12-13 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/widgets/gimpdock.c (gimp_dock_delete_event): invert logic so
|
||||
|
|
|
@ -72,6 +72,7 @@ splash_create (void)
|
|||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkScreen *screen;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
GdkGCValues values;
|
||||
|
@ -110,9 +111,6 @@ splash_create (void)
|
|||
|
||||
splash = g_new0 (GimpSplash, 1);
|
||||
|
||||
splash->width = gdk_pixbuf_get_width (pixbuf);
|
||||
splash->height = gdk_pixbuf_get_height (pixbuf);
|
||||
|
||||
splash->window =
|
||||
g_object_new (GTK_TYPE_WINDOW,
|
||||
"type", GTK_WINDOW_TOPLEVEL,
|
||||
|
@ -133,6 +131,13 @@ splash_create (void)
|
|||
G_CALLBACK (splash_map),
|
||||
NULL);
|
||||
|
||||
screen = gtk_widget_get_screen (splash->window);
|
||||
|
||||
splash->width = MIN (gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_screen_get_width (screen));
|
||||
splash->height = MIN (gdk_pixbuf_get_height (pixbuf),
|
||||
gdk_screen_get_height (screen));
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
||||
gtk_container_add (GTK_CONTAINER (splash->window), frame);
|
||||
|
|
Loading…
Reference in New Issue