Remove C99 use of non-constant initializers
To comply with C89, structure initializers should have only constant values. (Not a thorough check for this throughout the codebase, just StWidget is fixed up in this commit.) https://bugzilla.gnome.org/show_bug.cgi?id=608746
This commit is contained in:
parent
fb7ed1ee28
commit
dce4b2f325
@ -308,12 +308,11 @@ st_widget_allocate (ClutterActor *actor,
|
|||||||
|
|
||||||
if (priv->border_image && priv->bg_gradient_type == ST_GRADIENT_NONE)
|
if (priv->border_image && priv->bg_gradient_type == ST_GRADIENT_NONE)
|
||||||
{
|
{
|
||||||
ClutterActorBox frame_box = {
|
ClutterActorBox frame_box;
|
||||||
0,
|
|
||||||
0,
|
frame_box.x1 = frame_box.y1 = 0;
|
||||||
box->x2 - box->x1,
|
frame_box.x2 = box->x2 - box->x1;
|
||||||
box->y2 - box->y1
|
frame_box.y2 = box->y2 - box->y1;
|
||||||
};
|
|
||||||
|
|
||||||
clutter_actor_allocate (CLUTTER_ACTOR (priv->border_image),
|
clutter_actor_allocate (CLUTTER_ACTOR (priv->border_image),
|
||||||
&frame_box,
|
&frame_box,
|
||||||
@ -350,11 +349,13 @@ st_widget_allocate (ClutterActor *actor,
|
|||||||
|
|
||||||
if (priv->background_image)
|
if (priv->background_image)
|
||||||
{
|
{
|
||||||
ClutterActorBox frame_box = {
|
ClutterActorBox frame_box;
|
||||||
0, 0, box->x2 - box->x1, box->y2 - box->y1
|
|
||||||
};
|
|
||||||
gfloat w, h;
|
gfloat w, h;
|
||||||
|
|
||||||
|
frame_box.x1 = frame_box.y1 = 0;
|
||||||
|
frame_box.x2 = box->x2 - box->x1;
|
||||||
|
frame_box.y2 = box->y2 - box->y1;
|
||||||
|
|
||||||
clutter_actor_get_size (CLUTTER_ACTOR (priv->background_image), &w, &h);
|
clutter_actor_get_size (CLUTTER_ACTOR (priv->background_image), &w, &h);
|
||||||
|
|
||||||
/* scale the background into the allocated bounds */
|
/* scale the background into the allocated bounds */
|
||||||
|
Loading…
Reference in New Issue
Block a user