clutter/fixed-layout: Ignore hidden children in size request
Hidden actors aren't only invisible, they should also not take up any size. Found in the context of https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2347 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2488>
This commit is contained in:
parent
995ee2b638
commit
d2c4616242
@ -66,6 +66,9 @@ clutter_fixed_layout_get_preferred_width (ClutterLayoutManager *manager,
|
|||||||
{
|
{
|
||||||
gfloat child_x, child_min, child_natural;
|
gfloat child_x, child_min, child_natural;
|
||||||
|
|
||||||
|
if (!clutter_actor_is_visible (child))
|
||||||
|
continue;
|
||||||
|
|
||||||
child_x = clutter_actor_get_x (child);
|
child_x = clutter_actor_get_x (child);
|
||||||
|
|
||||||
clutter_actor_get_preferred_size (child,
|
clutter_actor_get_preferred_size (child,
|
||||||
@ -108,6 +111,9 @@ clutter_fixed_layout_get_preferred_height (ClutterLayoutManager *manager,
|
|||||||
{
|
{
|
||||||
gfloat child_y, child_min, child_natural;
|
gfloat child_y, child_min, child_natural;
|
||||||
|
|
||||||
|
if (!clutter_actor_is_visible (child))
|
||||||
|
continue;
|
||||||
|
|
||||||
child_y = clutter_actor_get_y (child);
|
child_y = clutter_actor_get_y (child);
|
||||||
|
|
||||||
clutter_actor_get_preferred_size (child,
|
clutter_actor_get_preferred_size (child,
|
||||||
|
Loading…
Reference in New Issue
Block a user