st/bin: Use child's align properties

By now, all containers and layout managers except StBin (and its
subclasses) use the generic ClutterActor expand/align properties
to control how their children are laid out.

This is particularly confusing as two or the properties StBin uses
for layout - x-align and y-align - shadow the generic ClutterActor
ones, but work very differently: They use a different enum and
determine how the bin lays out its child, instead of how the bin
is laid out by its parent.

Address this by deprecating the StBin properties and using the same
generic ClutterActor properties as everyone else.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803
This commit is contained in:
Florian Müllner
2019-10-17 23:27:27 +02:00
parent f0a5170473
commit 2f39bd8ba4
2 changed files with 41 additions and 23 deletions

View File

@@ -628,6 +628,8 @@ st_button_set_label (StButton *button,
"line-alignment", PANGO_ALIGN_CENTER,
"ellipsize", PANGO_ELLIPSIZE_END,
"use-markup", TRUE,
"x-align", CLUTTER_ACTOR_ALIGN_CENTER,
"y-align", CLUTTER_ACTOR_ALIGN_CENTER,
NULL);
st_bin_set_child (ST_BIN (button), label);
}