[iagno] Fix previous commit.



commit 09b04ff7e7660f8145acea7e6ab9970f5ea5feb9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Dec 30 14:12:43 2019 +0100

    Fix previous commit.
    
    This is not the main grid you are looking for.

 src/game-view.vala   | 7 ++++---
 src/game-window.vala | 8 ++++----
 2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index 6722771..d87e8f3 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -48,7 +48,7 @@ private class GameView : BaseView, AdaptativeWidget
         scrolled.add (new_game_box);
     }
 
-    internal GameView (GameWindowFlags flags, Box new_game_screen, Widget content)
+    internal GameView (GameWindowFlags flags, Box new_game_screen, Widget content, GameActionBarPlaceHolder 
actionbar_placeholder)
     {
         new_game_box.pack_start (new_game_screen, true, true, 0);
 
@@ -71,11 +71,12 @@ private class GameView : BaseView, AdaptativeWidget
 
         game_content = content;
 
-        game_box = new Box (Orientation.HORIZONTAL, 0);
+        game_box = new Box (Orientation.VERTICAL, 0);
         game_content.hexpand = true;
         game_content.vexpand = true;
         game_content.show ();
-        game_box.add (game_content);
+        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.show ();
         game_box.get_style_context ().add_class ("game-box");
 
diff --git a/src/game-window.vala b/src/game-window.vala
index 19bcfa9..b6664ec 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -39,9 +39,11 @@ private class GameWindow : BaseWindow, AdaptativeWidget
 
     internal GameWindow (string? css_resource, string name, string about_action_label, bool start_now, 
GameWindowFlags flags, Box new_game_screen, Widget view_content, GLib.Menu? appearance_menu, Widget? 
game_widget_1, Widget? game_widget_2, NightLightMonitor night_light_monitor)
     {
-        GameHeaderBar _headerbar = new GameHeaderBar (name, about_action_label, flags, appearance_menu, 
game_widget_1, night_light_monitor);
-        GameView      _game_view = new GameView (flags, new_game_screen, view_content);
         GameActionBar _actionbar = new GameActionBar (name, game_widget_2, /* show actionbar */ start_now);
+        GameActionBarPlaceHolder actionbar_placeholder = new GameActionBarPlaceHolder (_actionbar);
+
+        GameHeaderBar _headerbar = new GameHeaderBar (name, about_action_label, flags, appearance_menu, 
game_widget_1, night_light_monitor);
+        GameView      _game_view = new GameView (flags, new_game_screen, view_content, 
actionbar_placeholder);
 
         Object (nta_headerbar               : (NightTimeAwareHeaderBar) _headerbar,
                 base_view                   : (BaseView) _game_view,
@@ -54,8 +56,6 @@ private class GameWindow : BaseWindow, AdaptativeWidget
         game_view = _game_view;
         actionbar = _actionbar;
 
-        GameActionBarPlaceHolder actionbar_placeholder = new GameActionBarPlaceHolder (actionbar);
-        add_to_main_grid (actionbar_placeholder);
         add_to_main_overlay (actionbar);
         actionbar.valign = Align.END;
 


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