[gtk+/wip/unfocused-fixes: 24/27] label: Use the widget state flags as a base for drawing
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/unfocused-fixes: 24/27] label: Use the widget state flags as a base for drawing
- Date: Mon, 19 Dec 2011 16:26:28 +0000 (UTC)
commit 7dddc701872a81f1ef1a07bc750826d825dd4557
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Dec 19 15:21:55 2011 +0000
label: Use the widget state flags as a base for drawing
gtk/gtklabel.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index e1ae3d0..589f20a 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -4062,10 +4062,7 @@ gtk_label_draw (GtkWidget *widget,
gdk_cairo_region (cr, clip);
cairo_clip (cr);
- state = GTK_STATE_FLAG_SELECTED;
-
- if (gtk_widget_has_focus (widget))
- state |= GTK_STATE_FLAG_FOCUSED;
+ state |= GTK_STATE_FLAG_SELECTED;
gtk_style_context_get_color (context, state, &fg_color);
gtk_style_context_get_background_color (context, state, &bg_color);
@@ -4131,9 +4128,9 @@ gtk_label_draw (GtkWidget *widget,
text_color = link_color;
if (info->link_clicked)
- state = GTK_STATE_FLAG_ACTIVE;
+ state |= GTK_STATE_FLAG_ACTIVE;
else
- state = GTK_STATE_FLAG_PRELIGHT;
+ state |= GTK_STATE_FLAG_PRELIGHT;
gtk_style_context_get_background_color (context, state, &bg_color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]