st-entry: Support a different color for selected text

This should improve readability in text entries where the text
color is very close to the color of the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=643768
This commit is contained in:
Jasper St. Pierre 2011-03-02 16:18:42 -05:00
parent 0aa626b2fb
commit f524138a64

View File

@ -209,6 +209,9 @@ st_entry_style_changed (StWidget *self)
if (st_theme_node_lookup_color (theme_node, "selection-background-color", FALSE, &color)) if (st_theme_node_lookup_color (theme_node, "selection-background-color", FALSE, &color))
clutter_text_set_selection_color (CLUTTER_TEXT (priv->entry), &color); clutter_text_set_selection_color (CLUTTER_TEXT (priv->entry), &color);
if (st_theme_node_lookup_color (theme_node, "selected-color", FALSE, &color))
clutter_text_set_selected_text_color (CLUTTER_TEXT (priv->entry), &color);
font = st_theme_node_get_font (theme_node); font = st_theme_node_get_font (theme_node);
font_string = pango_font_description_to_string (font); font_string = pango_font_description_to_string (font);
clutter_text_set_font_name (CLUTTER_TEXT (priv->entry), font_string); clutter_text_set_font_name (CLUTTER_TEXT (priv->entry), font_string);