summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-03-14 13:45:47 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-03-14 13:46:31 -0400
commit08f8fd2f5c8e34bd386e5b965fc25fb59e7e123a (patch)
tree07cd68d0ee28bf7477e3b70b37e62d4225e8d835 /tests
parent3504f494736af12b2b9270527df044aacea19236 (diff)
downloadgtk+-08f8fd2f5c8e34bd386e5b965fc25fb59e7e123a.tar.gz
Test size constraints
This adds some min/max size hints to testimage.
Diffstat (limited to 'tests')
-rw-r--r--tests/testimage.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/testimage.c b/tests/testimage.c
index 3ad95e6186..1b2bb0f8c9 100644
--- a/tests/testimage.c
+++ b/tests/testimage.c
@@ -104,6 +104,7 @@ main (int argc, char **argv)
gchar *anim_filename = NULL;
GIcon *icon;
GFile *file;
+ GdkGeometry geo;
gtk_init (&argc, &argv);
@@ -114,6 +115,14 @@ main (int argc, char **argv)
anim_filename = argv[2];
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ geo.min_width = 400;
+ geo.min_height = 300;
+ geo.max_width = 800;
+ geo.max_height = 600;
+
+ gtk_window_set_geometry_hints (GTK_WINDOW (window), NULL, &geo, GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
+
grid = gtk_grid_new ();
gtk_container_add (GTK_CONTAINER (window), grid);