aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-10-11 21:21:41 +0800
committerMilan Crha <mcrha@redhat.com>2011-10-11 21:21:41 +0800
commit6d2863d35a413fd8e1164b852597ecee44701dca (patch)
tree22acbe231e0357c8145669db4848d72f96898f2a /widgets
parent68b890ab4d1f7bb0c7bf6cfac77f320e42806311 (diff)
downloadgsoc2013-evolution-6d2863d35a413fd8e1164b852597ecee44701dca.tar.gz
gsoc2013-evolution-6d2863d35a413fd8e1164b852597ecee44701dca.tar.zst
gsoc2013-evolution-6d2863d35a413fd8e1164b852597ecee44701dca.zip
Bug #661434 - Unfriendly search result
Diffstat (limited to 'widgets')
-rw-r--r--widgets/text/e-text.c6
-rw-r--r--widgets/text/e-text.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index d7512a509a..8e2149cd10 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -773,6 +773,7 @@ e_text_set_property (GObject *object,
(color.green & 0xff00) << 8 |
(color.blue & 0xff00) |
0xff);
+ text->rgba_set = TRUE;
text->needs_redraw = 1;
needs_update = 1;
break;
@@ -787,6 +788,7 @@ e_text_set_property (GObject *object,
(color.green & 0xff00) << 8 |
(color.blue & 0xff00) |
0xff);
+ text->rgba_set = TRUE;
text->needs_redraw = 1;
needs_update = 1;
break;
@@ -796,6 +798,7 @@ e_text_set_property (GObject *object,
color.red = ((text->rgba >> 24) & 0xff) * 0x101;
color.green = ((text->rgba >> 16) & 0xff) * 0x101;
color.blue = ((text->rgba >> 8) & 0xff) * 0x101;
+ text->rgba_set = TRUE;
text->needs_redraw = 1;
needs_update = 1;
break;
@@ -1308,7 +1311,7 @@ e_text_draw (GnomeCanvasItem *item,
cairo_save (cr);
- if (text->draw_background || text->draw_button) {
+ if (text->draw_background || text->draw_button || !text->rgba_set) {
gdk_cairo_set_source_color (cr, &style->fg[state]);
} else {
cairo_set_source_rgba (cr,
@@ -3500,6 +3503,7 @@ e_text_init (EText *text)
text->im_context_signals_registered = FALSE;
text->handle_popup = FALSE;
+ text->rgba_set = FALSE;
e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (text), e_text_reflow);
}
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index ef9aefdf34..aa84553ade 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -128,6 +128,7 @@ struct _EText {
gint height; /* Rendered text height in pixels */
guint32 rgba; /* RGBA color for text */
+ gboolean rgba_set; /* whether RGBA is set */
gchar *ellipsis; /* The ellipsis characters. NULL = "...". */
gdouble ellipsis_width; /* The width of the ellipsis. */