[four-in-a-row/arnaudb/wip/gtk4: 66/92] Adapt to Box API.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [four-in-a-row/arnaudb/wip/gtk4: 66/92] Adapt to Box API.
- Date: Sat, 26 Sep 2020 10:29:07 +0000 (UTC)
commit 53fa4d3745be0658c2730f97c74b7ca8b58be3ed
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sun Apr 19 19:57:06 2020 +0200
Adapt to Box API.
src/game-window.vala | 12 ++++++++----
src/scorebox.vala | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/game-window.vala b/src/game-window.vala
index 2905049..ff4e3c6 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -98,9 +98,11 @@ private class GameWindow : AdaptativeWindow, AdaptativeWidget
overlay.add_overlay (actionbar);
GameActionBarPlaceHolder actionbar_placeholder = new GameActionBarPlaceHolder (actionbar);
- game_box.pack_end (actionbar_placeholder, /* expand */ false, /* fill */ true, /* padding */ 0);
+ actionbar_placeholder.insert_after (game_box, /* insert first */ null);
- new_game_box.pack_start (new_game_screen, true, true, 0);
+ new_game_screen.hexpand = true;
+ new_game_screen.vexpand = true;
+ new_game_screen.insert_after (new_game_box, /* insert first */ null);
add_adaptative_child ((AdaptativeWidget) new_game_screen);
add_adaptative_child ((AdaptativeWidget) actionbar);
add_adaptative_child ((AdaptativeWidget) actionbar_placeholder);
@@ -117,11 +119,13 @@ private class GameWindow : AdaptativeWindow, 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"));
((StyleContext) _start_game_button.get_style_context ()).add_class ("suggested-action");
- new_game_box.pack_end (_start_game_button, false, false, 0);
+ _start_game_button.insert_after (new_game_box, new_game_screen);
start_game_button = _start_game_button;
}
- game_box.pack_start (view, true, true, 0);
+ view.hexpand = true;
+ view.vexpand = true;
+ view.insert_before (game_box, actionbar_placeholder);
game_box.set_focus_child (view); // TODO test if necessary; note: view could grab focus
from application
view.halign = Align.FILL;
view.can_focus = true;
diff --git a/src/scorebox.vala b/src/scorebox.vala
index d87208a..f7d392c 100644
--- a/src/scorebox.vala
+++ b/src/scorebox.vala
@@ -81,7 +81,7 @@ private class Scorebox : Dialog
grid.attach (label_score_end, 1, 2, 1, 1);
label_score_end.halign = Align.END;
- get_content_area ().pack_start (grid);
+ get_content_area ().append (grid);
theme_manager.theme_changed.connect (update);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]