Skip to content
Unverified Commit b07a05bb authored by Murray Cumming's avatar Murray Cumming
Browse files

Box: pack_start/pack_end(): Adapt to new GTK+ API.

pack_start(Widget& child, bool expand, bool fill) and
pack_end(Widget& child, bool expand, bool fill):
Remove the expand and fill parameters, as in the C API:
https://git.gnome.org/browse/gtk+/commit/?id=5729ea7744c2a41ae8fb833db6690a6aa5ad7a84
https://git.gnome.org/browse/gtk+/commit/?id=c92b7d4224b9cef1d08373fcc28f7fbd96c64e6d
(They want us to use the GtkWidget halign and hexpand properties
instead.)

pack_start(Gtk::Widget& child, Gtk::PackOptions options) and
pack_start(Gtk::Widget& child, Gtk::PackOptions options):
Reimplement these using the GtkWidget halign and hexpand properties.
These still seem useful, because it still doesn't seem useful to fill
while not expanding, so having a 3-value enum seems to make it clearer.
It also still seems useful to specify this in one method call when
adding the widget, instead of having separate code to set the widget
properties. Hopefully this works.

However, we now need to remove the default options value, to avoid
ambiguity with the standard pack_start()/pack_end(). And unfortunately,
the default GtkWidget halign and hexpand property values do not
correspond to our previous options value (PACK_EXPAND_WIDGET), which
fills and expands the widget. So some application code will now change
its behaviour without any warning from the compiler.

It might be better to just remove these pack_start()/pack_end()
overrides, as they don't quite correspond to the new halign/hexpand
system anyway.
parent 1b59f11b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment