From 0a8ec7f7d575423ca984f10171998d85ef035a13 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 3 Mar 2011 06:33:42 -0500 Subject: [PATCH] tests: Add test for selected-text-color http://bugzilla.clutter-project.org/show_bug.cgi?id=2595 --- tests/interactive/test-text-field.c | 2 ++ tests/interactive/test-text.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/interactive/test-text-field.c b/tests/interactive/test-text-field.c index 76e2cf4c9..e837a021a 100644 --- a/tests/interactive/test-text-field.c +++ b/tests/interactive/test-text-field.c @@ -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), diff --git a/tests/interactive/test-text.c b/tests/interactive/test-text.c index a981e0dbc..8455a93b8 100644 --- a/tests/interactive/test-text.c +++ b/tests/interactive/test-text.c @@ -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]) {