[gnome-taquin/arnaudb/wip/gtk4: 14/56] Adapt to Box API.




commit e52f92e6645e1b2de7ed1f48bfb927d8b64c9975
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Feb 19 22:05:56 2020 +0100

    Adapt to Box API.

 src/game-view.vala | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index 17218f0..0e62ada 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -50,7 +50,7 @@ private class GameView : BaseView, AdaptativeWidget
 
     internal GameView (GameWindowFlags flags, Box new_game_screen, Widget content, GameActionBarPlaceHolder 
actionbar_placeholder)
     {
-        new_game_box.pack_start (new_game_screen, true, true, 0);
+        new_game_box.add (new_game_screen);
 
         if (GameWindowFlags.SHOW_START_BUTTON in flags)
         {
@@ -65,7 +65,7 @@ private class GameView : BaseView, AdaptativeWidget
             /* Translators: when configuring a new game, tooltip text of the blue Start button */
             // _start_game_button.set_tooltip_text (_("Start a new game as configured"));
             _start_game_button.show ();
-            new_game_box.pack_end (_start_game_button, false, false, 0);
+            new_game_box.add (_start_game_button);
             start_game_button = _start_game_button;
         }
 
@@ -75,13 +75,14 @@ private class GameView : BaseView, AdaptativeWidget
         game_content.hexpand = true;
         game_content.vexpand = true;
         game_content.show ();
-        game_box.pack_start (game_content, /* expand */ true, /* fill */ true, /* padding */ 0);
-        game_box.pack_end (actionbar_placeholder, /* expand */ false, /* fill */ false, /* padding */ 0);
+        game_box.add (game_content);
+        game_box.add (actionbar_placeholder);
         game_box.show ();
         game_box.get_style_context ().add_class ("game-box");
 
         // for the new-game-screen-to-game animation, it is probably better to have the game under 
("uncovered")
-        game_stack.add_with_properties (game_box, "position", 0);
+//        game_box.insert_before (game_stack, game_stack.get_first_child ());
+        game_stack.add (game_box);
         content.can_focus = true;
     }
 


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