clutter/actor: Allow setting width and height properties to -1.0

ClutterActors width and height can be reset to automatically use the
preferred (calculated) value by setting the width or height to -1, so
far this only works by setting it using `clutter_actor_set_width()` or
`clutter_actor_set_height()`, make sure it can also be done using the
"width" and "height" GObject properties.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1018
This commit is contained in:
Jonas Dreßler 2020-01-24 13:03:41 +01:00 committed by Georges Basile Stavracas Neto
parent 612b622689
commit b3fbc26340

View File

@ -6602,7 +6602,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_param_spec_float ("width",
P_("Width"),
P_("Width of the actor"),
0.0, G_MAXFLOAT,
-1.0f, G_MAXFLOAT,
0.0,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
@ -6621,7 +6621,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_param_spec_float ("height",
P_("Height"),
P_("Height of the actor"),
0.0, G_MAXFLOAT,
-1.0f, G_MAXFLOAT,
0.0,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |