clutter/stage: Remove color property

The property is deprecated and the current implementation simply
redirects it to ClutterActor::background-color, so remove it.

Also update the tests to set the background color directly.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1332
This commit is contained in:
Georges Basile Stavracas Neto
2020-06-26 16:43:45 -03:00
committed by Robert Mader
parent ce3e293a18
commit ae49f89cf3
24 changed files with 22 additions and 98 deletions

View File

@ -48,7 +48,7 @@ main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkComponent Test");
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_White);
clutter_actor_set_size (stage, WIDTH, HEIGHT);
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);

View File

@ -169,7 +169,7 @@ make_ui (ClutterActor *stage)
ClutterActor *button = NULL;
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEditable Test");
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_White);
clutter_actor_set_size (stage, WIDTH, HEIGHT);
/* text */

View File

@ -93,7 +93,7 @@ make_ui (ClutterActor *stage)
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
float label_geom_y, editable_geom_y;
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_White);
clutter_actor_set_size (stage, WIDTH, HEIGHT);
label_geom_y = 50;

View File

@ -180,7 +180,7 @@ make_ui (ClutterActor *stage)
ClutterActor *rectangle = NULL;
ClutterActor *label = NULL;
clutter_stage_set_color (CLUTTER_STAGE (stage), &color_stage);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), &color_stage);
clutter_actor_set_size (stage, WIDTH, HEIGHT);
/* text */

View File

@ -45,7 +45,7 @@ make_ui (ClutterActor *stage)
ClutterActor *cloned_entry = NULL;
clutter_stage_set_color (CLUTTER_STAGE (stage), &color_stage);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), &color_stage);
clutter_actor_set_size (stage, WIDTH, HEIGHT);
label = clutter_text_new_full ("Sans Bold 32px",

View File

@ -169,7 +169,7 @@ texture_fbo (TestConformSimpleFixture *fixture,
state.stage = clutter_stage_new ();
clutter_stage_set_color (CLUTTER_STAGE (state.stage), &stage_color);
clutter_actor_set_background_color (CLUTTER_ACTOR (state.stage), &stage_color);
/* Onscreen source with clone next to it */
actor = create_source ();

View File

@ -130,7 +130,7 @@ test_cogl_multitexture_main (int argc, char *argv[])
clutter_actor_get_size (stage, &stage_w, &stage_h);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl: Multi-texturing");
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), &stage_color);
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);

View File

@ -254,7 +254,7 @@ test_cogl_point_sprites_main (int argc, char *argv[])
}
stage = clutter_stage_new ();
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Black);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_Black);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl Point Sprites");
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
g_signal_connect_after (stage, "paint", G_CALLBACK (paint_cb), &data);

View File

@ -310,7 +310,7 @@ test_cogl_shader_glsl_main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_stage_set_title (CLUTTER_STAGE (stage), "Assembly Shader Test");
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), &stage_color);
file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
error = NULL;

View File

@ -399,7 +399,7 @@ test_cogl_tex_polygon_main (int argc, char *argv[])
/* Stage */
stage = clutter_stage_new ();
clutter_stage_set_color (CLUTTER_STAGE (stage), &blue);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), &blue);
clutter_actor_set_size (stage, 640, 480);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl Texture Polygon");
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);

View File

@ -153,7 +153,7 @@ main (int argc, char *argv[])
state.stage = stage = clutter_stage_new ();
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_White);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl Performance Test");
/* We want continuous redrawing of the stage... */

View File

@ -91,7 +91,7 @@ main (int argc, char **argv)
stage = clutter_stage_new ();
clutter_actor_set_size (stage, 512, 512);
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Black);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_Black);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Picking");
printf ("Picking performance test with "

View File

@ -131,7 +131,7 @@ main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Black);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_Black);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text Performance");
g_signal_connect (stage, "paint", G_CALLBACK (on_paint), NULL);

View File

@ -55,7 +55,7 @@ main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Black);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_Black);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text");
group = clutter_actor_new ();

View File

@ -85,7 +85,7 @@ main (int argc, char **argv)
stage = clutter_stage_new ();
clutter_actor_set_size (stage, 512, 512);
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Black);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), CLUTTER_COLOR_Black);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Picking Performance");
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);

View File

@ -109,7 +109,7 @@ main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), &stage_color);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text Performance");
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);