Make unfocused selections visible in entries

This commit is contained in:
Matthias Clasen 2010-11-22 20:55:02 -05:00 committed by Carlos Garnacho
parent 21a193ad02
commit fc10599ac8
3 changed files with 8 additions and 2 deletions

View File

@ -3498,6 +3498,10 @@ gtk_css_provider_get_default (void)
" background-color: shade (@base_color, 0.9);\n"
" color: shade (@base_color, 0.7);\n"
"}\n"
".entry:active {\n"
" background-color: #c4c2bd;\n"
" color: #000;\n"
"}\n"
"\n"
".progressbar:prelight,\n"
".entry.progressbar {\n"

View File

@ -3419,8 +3419,7 @@ gtk_entry_draw_frame (GtkWidget *widget,
}
style = gtk_widget_get_style (widget);
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
state = gtk_widget_get_state (widget);
gtk_paint_flat_box (style, cr,
state, GTK_SHADOW_NONE,

View File

@ -2619,6 +2619,9 @@ gtk_default_draw_flat_box (GtkStyle *style,
case GTK_STATE_ACTIVE:
flags |= GTK_STATE_FLAG_ACTIVE;
break;
case GTK_STATE_FOCUSED:
flags |= GTK_STATE_FLAG_FOCUSED;
break;
default:
break;
}