[gnome-2048/arnaudb/wip/gtk4: 8/30] Uncomment some things.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048/arnaudb/wip/gtk4: 8/30] Uncomment some things.
- Date: Tue, 14 Jul 2020 11:04:32 +0000 (UTC)
commit 452c1a86bbc925cf57dd89bfa5f26dd81ee673a4
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Apr 28 08:35:36 2020 +0200
Uncomment some things.
src/game.vala | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index c879c04..a63e2f1 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -88,6 +88,20 @@ private class Game : Object
// private Clutter.Actor _view_background;
// private Clutter.Actor _view_foreground;
+ [CCode (notify = false)] internal Board view {
+ internal get { return _view; }
+ internal set {
+ _view = value;
+ _view.size_allocate.connect (_on_size_allocate);
+
+// _view_background = new Clutter.Actor ();
+// _view_foreground = new Clutter.Actor ();
+// _view_background.show ();
+// _view_foreground.show ();
+// _view.add_child (_view_background);
+// _view.add_child (_view_foreground);
+ }
+ }
// [CCode (notify = false)] internal Clutter.Actor view {
// internal get { return _view; }
// internal set {
@@ -103,13 +117,13 @@ private class Game : Object
// }
// }
-// private void _on_allocation_changed (Clutter.ActorBox box, Clutter.AllocationFlags flags)
-// {
-// if (_background_init_done)
-// _resize_view ();
-// else
-// _init_background ();
-// }
+ private void _on_size_allocate (Gtk.Widget widget, int width, int height, int baseline)
+ {
+ if (_background_init_done)
+ _resize_view ();
+ else
+ _init_background ();
+ }
/*\
* * others
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]