tests: Add test for selected-text-color

http://bugzilla.clutter-project.org/show_bug.cgi?id=2595
This commit is contained in:
Jasper St. Pierre 2011-03-03 06:33:42 -05:00 committed by Emmanuele Bassi
parent d95258e987
commit 0a8ec7f7d5
2 changed files with 4 additions and 0 deletions

View File

@ -238,6 +238,7 @@ create_entry (const ClutterColor *color,
{
ClutterActor *retval = clutter_text_new_full (NULL, text, color);
ClutterColor selection = { 0, };
ClutterColor selected_text = { 0x00, 0x00, 0xff, 0xff };
clutter_actor_set_reactive (retval, TRUE);
@ -250,6 +251,7 @@ create_entry (const ClutterColor *color,
clutter_text_set_password_char (CLUTTER_TEXT (retval), password_char);
clutter_text_set_cursor_color (CLUTTER_TEXT (retval), &selection);
clutter_text_set_max_length (CLUTTER_TEXT (retval), max_length);
clutter_text_set_selected_text_color (CLUTTER_TEXT (retval), &selected_text);
g_signal_connect (retval, "activate",
G_CALLBACK (on_entry_activate),

View File

@ -19,6 +19,7 @@ test_text_main (gint argc,
ClutterColor text_color = { 0x33, 0xff, 0x33, 0xff };
ClutterColor cursor_color = { 0xff, 0x33, 0x33, 0xff };
ClutterColor background_color = { 0x00, 0x00, 0x00, 0xff };
ClutterColor selected_text_color = { 0x00, 0x00, 0xff, 0xff };
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
@ -39,6 +40,7 @@ test_text_main (gint argc,
clutter_text_set_editable (CLUTTER_TEXT (text), TRUE);
clutter_text_set_selectable (CLUTTER_TEXT (text), TRUE);
clutter_text_set_cursor_color (CLUTTER_TEXT (text), &cursor_color);
clutter_text_set_selected_text_color (CLUTTER_TEXT (text), &selected_text_color);
if (argv[1])
{