tests: Use gtk_window_set_default_size() when appropriate

Replace the usage of gtk_window_resize() with
gtk_window_set_default_size() where possible.
This commit is contained in:
Jonas Ådahl 2020-12-02 10:08:46 +01:00
parent deb58339b9
commit f083849ebb
2 changed files with 4 additions and 4 deletions

View File

@ -239,9 +239,9 @@ main (int argc, char **argv)
}
gsk_render_node_get_bounds (GTK_NODE_VIEW (nodeview)->node, &node_bounds);
gtk_window_resize (GTK_WINDOW (window),
MAX (600, node_bounds.size.width),
MAX (500, node_bounds.size.height));
gtk_window_set_default_size (GTK_WINDOW (window),
MAX (600, node_bounds.size.width),
MAX (500, node_bounds.size.height));
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
gtk_widget_show (window);

View File

@ -46,7 +46,7 @@ int main (int argc, char **argv)
gtk_init ();
window = gtk_window_new ();
gtk_window_resize (GTK_WINDOW (window), 400, 300);
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 12);