Turns out that the destination is the last parameter, not the first one.
This fixes the flickering in the first page of the widget-factory when
using the expander on page 2.
Homogeneous branches repeated the calculation/assignment of the initial
space available to children. This avoids that by shuffling some code.
Perhaps more importantly, in doing that, I ended up with some ambiguous
names, and Company and I realised how vague the pre-existing naming was.
"size" becomes "extra_space", as this is what it represents. Conversely,
"extra" becomes "size_given_to_child" (albeit still given out in two
different ways depending on whether the Box is homogeneous). My hope is
that these sections of code are now somewhat less baffling than before!
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
The code for adjusting the center widget allocation in case
of uneven sides never worked right in RTL. This was finally
noticed for tabs with close button, which commonly use a
centered label.
This reverts commit 572e9a0402.
_gtk_box_get_children was not doing exactly the same than
gtk_container_get_children does, because the latter uses the forall
implementation of GtkBox that takes into account the children pack mode while
the former just iterated the list of children. This broke the order of
the buttons in a GtkButtonBox when they were packaged with PACK_END.
gtk_css_node_set_after/before() are now called
gtk_css_node_insert_after/before().
This brings them in line with other similar APIs (ie GtkListStore). And
it allows easier usage of the API (see changes to gtkbox.c).
The intention of the expand widget flags was to in fact propagate
legacy expand child properties as well. Due to implementation errors,
this was only happening in some cases, but not in others. To avoid
breaking old code assuming traditional expand flag behavior, this
commit removes all attempts to propagate GtkBox::expand.
This was discussed in
https://bugzilla.gnome.org/show_bug.cgi?id=698656 and
https://bugzilla.gnome.org/show_bug.cgi?id=628902
This patch was written by Tristan Van Berkom.
Report a baseline based height and baseline whenever there
are children with ALIGN_BASELINE.
Assign baseline to childen in size_allocate. Either the one inherited
from the parent if set, or otherwise calculate one based on any
ALIGN_BASELINE children.
If you want to get rounded corners on an hbox, instead of
:first-child {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
:last-child {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
you now need to write:
:first-child, :last-child:dir(rtl) {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
:last-child, :first-child:dir(rtl) {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
function caching the path.
If gtkbox is the only object having a reference on one of its child
and that we try to remove it from its container, we endup having a
warning when disconnecting a signal after having unparented the
widget.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=670176
Use foreach() instead of forall() to find the child's siblings
because internal children of subclasses have no sibling relation
to the box' children. Also deal with the subclass failing to
implement get_path_for_child(). This caused an infinite widget
path invalidation loop of sorts with GimpMessageBox, which is a
vertical box with a decorative icon to the left.
At the same time, drop the AtkText implementation.
Also, reintroduce a GtkBoxAccessible, since the previous
way of setting the role in get_accessible was affecting
GtkBox subclasses negatively.
Adjust expected test output to match.
When we build the sibling path for the order, we do not skip hidden
children (since, quoting the comment, "we cannot reliably detect changes
in widget visibility"). So we need to invalidate the order when hidden
children are reordered and removed.
https://bugzilla.gnome.org/show_bug.cgi?id=652769
Stop documenting the base class as just a base class for the
H and V specializations, copying the useful descriptions from
those H/V classes to the base class. Do not advise the use of
the H/V classes or refer to them unnecessarily.