Re: gtk4: gtk_box_pack_start()/end() porting

On 03.05, Murray Cumming wrote:
On Wed, 2017-05-03 at 14:22 +0200, Timm Bäder wrote:
Have some container widgets changed, or lost, some default
spacing/padding/margins too? For instance, it looks like
used to have some hard-coded spacing between its child widgets
via gtk_action_bar_pack_start()), but not with gtk4.

Yes, iirc GtkPopover with .menu and GtkFileChooserButton, etc. lost
spacing. Since GtkBox supports border-spacing via CSS now, I think
themes should handle that instead, but Adwaita doesn't care yet.

So, applications shouldn't generally need to specify any spacing at all
between child widgets in containers? For instance
- Gtk::Box::spacing
- margin of child widgets in a Gtk::ActionBar
- Gtk::Grid column-spacing and row-spacing

No, I'm talking about individual widgets, not applications and their
UI[1]. The default values of the properties are gone in GTK+, but not
the properties itself. GtkActionBar lost its spacing property I think,
but that's just because I didn't know if there's a real use case for it,
it seems like something the theme should control in this case.
Right now we still have all the spacing properties in GtBox,
GtkGrid, etc. as you mentioned and of course the widget margin
properties you can use and they still work like they did in gtk3.

[1]Even though spacing *should* probably be handled by the theme, so the
theme can decide whether UIs are more spacey or more narrow, nobody has
come up with a proper way for applications to specify that.

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