[gnome-sudoku/arnaudb/wip/gtk4: 43/43] Fix Gtk bug.




commit 3cd2d7965698f0f9a0c59dbcd79772e09ecdacb8
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Aug 5 19:40:33 2020 +0200

    Fix Gtk bug.
    
    TODO report to Gtk.

 data/gnome-sudoku.ui  | 2 +-
 src/gnome-sudoku.vala | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/data/gnome-sudoku.ui b/data/gnome-sudoku.ui
index 3d69fb2..dad7fb5 100644
--- a/data/gnome-sudoku.ui
+++ b/data/gnome-sudoku.ui
@@ -205,7 +205,7 @@
               <object class="GtkStackPage"> <!-- frame page -->
                 <property name="name">frame</property>
                 <property name="child">
-                  <object class="GtkAspectFrame"> <!-- frame -->
+                  <object class="GtkAspectFrame" id="frame"> <!-- frame -->
                     <property name="obey-child">False</property>
                     <property name="ratio">1.4</property>
                     <child>
diff --git a/src/gnome-sudoku.vala b/src/gnome-sudoku.vala
index 4647c50..077e565 100644
--- a/src/gnome-sudoku.vala
+++ b/src/gnome-sudoku.vala
@@ -170,6 +170,10 @@ public class Sudoku : Gtk.Application
         play_pause_button = (Button) builder.get_object ("play_pause_button");
         play_pause_label = (Label) builder.get_object ("play_pause_label");
 
+        AspectFrame frame = (AspectFrame) builder.get_object ("frame");
+        BinLayout layout = new BinLayout ();
+        frame.set_layout_manager (layout);
+
         undo_action = (SimpleAction) lookup_action ("undo");
         redo_action = (SimpleAction) lookup_action ("redo");
         new_game_action = (SimpleAction) lookup_action ("new-game");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]