[libgnome-games-support/andy128k-gtk4] Add a child property to GridFrame



commit e1e949e449ec9113d23c058fbfef5744e056a480
Author: Andrey Kutejko <andy128k gmail com>
Date:   Sun Sep 12 16:23:17 2021 +0200

    Add a child property to GridFrame

 games/gridframe.vala | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/games/gridframe.vala b/games/gridframe.vala
index 5d5b743..fd4c121 100644
--- a/games/gridframe.vala
+++ b/games/gridframe.vala
@@ -110,6 +110,23 @@ public class GridFrame : Gtk.Widget
         }
     }
 
+    private Gtk.Widget _child = null;
+    public Gtk.Widget child {
+        get { return _child; }
+
+        set
+        {
+            if (_child == value)
+                return;
+            if (_child != null)
+                _child.unparent ();
+            _child = value;
+            if (_child != null)
+                _child.set_parent (this);
+            queue_resize ();
+        }
+    }
+
     private Gtk.Allocation old_allocation;
 
     public GridFrame (int width, int height)


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