File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -219,8 +219,6 @@ if Gtk.Container then
219219 end
220220end
221221
222- ---- ---------------------------- Gtk.Box overrides.
223- Gtk .Box ._container_add = Gtk .Box .append
224222
225223---- ---------------------------- Gtk.Builder overrides.
226224Gtk .Builder ._attribute = {}
@@ -634,6 +632,25 @@ Gtk._constant.PRINT_OUTPUT_URI = 'output-uri'
634632-- Gtk-cairo integration helpers.
635633cairo .Context ._method .should_draw_window = Gtk .cairo_should_draw_window
636634
635+ ---- ---------------------------- Gtk-4 overrides
636+
637+
638+ if Gtk ._version == ' 4.0' then
639+
640+ --- CONTAINER CLASSES
641+ --- GTK4 Has removed the Container abstract class.
642+ --- This means Boxes, Grids and other layout widgets
643+ --- Must now add children using their own specific methods.
644+
645+ --- Gtk.Box overrides
646+
647+ --- widgets on a the array part of the constructor of a Box
648+ --- will be `append()`-ed
649+ --- in order of appearance.
650+ Gtk .Box ._container_add = Gtk .Box .append
651+
652+ end
653+
637654---- ----------------------------- Gtk-2 workarounds
638655if Gtk ._version == ' 2.0' then
639656 -- Get rid of Gtk.Bin internal 'child' field, which gets in the way
You can’t perform that action at this time.
0 commit comments