[clutter/text-selection-color: 1/5] tests: Add test for selected-text-color



commit d4aabb70eff2e66bd1d0de189a07cde5baa64d4e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Mar 3 06:33:42 2011 -0500

    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(+), 0 deletions(-)
---
diff --git a/tests/interactive/test-text-field.c b/tests/interactive/test-text-field.c
index 76e2cf4..e837a02 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 a981e0d..8455a93 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])
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]