mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
testgrid: add a testcase
Add a testcase for an empty, homogeneous grid. https://bugzilla.gnome.org/show_bug.cgi?id=672763
This commit is contained in:
parent
ed17c74f58
commit
32c7cdd4b1
@ -210,6 +210,31 @@ empty_line (void)
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
static void
|
||||
empty_grid (void)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *child;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Empty grid");
|
||||
grid = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 10);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 10);
|
||||
gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
|
||||
|
||||
child = test_widget ("(0, 0)", "red");
|
||||
gtk_grid_attach (GTK_GRID (grid), child, 0, 0, 1, 1);
|
||||
gtk_widget_set_hexpand (child, TRUE);
|
||||
gtk_widget_set_vexpand (child, TRUE);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
gtk_widget_hide (child);
|
||||
}
|
||||
|
||||
static void
|
||||
scrolling (void)
|
||||
{
|
||||
@ -345,6 +370,7 @@ main (int argc, char *argv[])
|
||||
empty_line ();
|
||||
scrolling ();
|
||||
insert ();
|
||||
empty_grid ();
|
||||
|
||||
gtk_main ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user