[gtk+] textdisplay: Use the widget state flags as a base for drawing



commit 2efa658a416b0c651ef13ae99a601d52841e69fd
Author: Rui Matos <tiagomatos gmail com>
Date:   Wed Dec 21 23:27:15 2011 +0000

    textdisplay: Use the widget state flags as a base for drawing

 gtk/gtktextdisplay.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c
index 7911d2f..42928f1 100644
--- a/gtk/gtktextdisplay.c
+++ b/gtk/gtktextdisplay.c
@@ -584,10 +584,9 @@ render_para (GtkTextRenderer    *text_renderer,
   screen_width = line_display->total_width;
 
   context = gtk_widget_get_style_context (text_renderer->widget);
+  state = gtk_widget_get_state_flags (text_renderer->widget);
 
-  state = GTK_STATE_FLAG_SELECTED;
-  if (gtk_widget_has_focus (text_renderer->widget))
-    state |= GTK_STATE_FLAG_FOCUSED;
+  state |= GTK_STATE_FLAG_SELECTED;
 
   gtk_style_context_get_background_color (context, state, &selection);
 



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