From 2f72353e0e1951f52c076a021ec882e0fe4f620c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 10 Jul 2018 13:28:37 +0200 Subject: [PATCH] gtk-demo: Update aspect-ratio when selecting new puzzle --- demos/gtk-demo/sliding_puzzle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c index 5ce5316159..60762342c9 100644 --- a/demos/gtk-demo/sliding_puzzle.c +++ b/demos/gtk-demo/sliding_puzzle.c @@ -295,6 +295,7 @@ start_puzzle (GdkPaintable *puzzle) grid = gtk_grid_new (); gtk_widget_set_can_focus (grid, TRUE); gtk_container_add (GTK_CONTAINER (frame), grid); + gtk_aspect_frame_set (GTK_ASPECT_FRAME (frame), 0.5, 0.5, (float) gdk_paintable_get_intrinsic_aspect_ratio (puzzle), FALSE); /* Add a key event controller so people can use the arrow * keys to move the puzzle */