summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2020-12-02 10:08:46 +0100
committerJonas Ådahl <jadahl@gmail.com>2020-12-07 09:46:39 +0100
commitf083849ebbe0e716677bfa4887c2dc0fdd6c7712 (patch)
tree9953715adf77932297a5a05486c46880c9ad5cda /tests
parentdeb58339b955834b5d0c7dbd39e9706c3c22ad8c (diff)
downloadgtk+-f083849ebbe0e716677bfa4887c2dc0fdd6c7712.tar.gz
tests: Use gtk_window_set_default_size() when appropriate
Replace the usage of gtk_window_resize() with gtk_window_set_default_size() where possible.
Diffstat (limited to 'tests')
-rw-r--r--tests/showrendernode.c6
-rw-r--r--tests/testmenubutton.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/showrendernode.c b/tests/showrendernode.c
index 5fafd3c00e..43f99b5198 100644
--- a/tests/showrendernode.c
+++ b/tests/showrendernode.c
@@ -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);
diff --git a/tests/testmenubutton.c b/tests/testmenubutton.c
index a1f1c78a9d..4752cce214 100644
--- a/tests/testmenubutton.c
+++ b/tests/testmenubutton.c
@@ -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);