[evolution/gnome-3-2] Bug #661434 - Unfriendly search result
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-2] Bug #661434 - Unfriendly search result
- Date: Tue, 11 Oct 2011 13:22:46 +0000 (UTC)
commit 51d019cc1931bf5d475e06d90382b7ac0848dad4
Author: Milan Crha <mcrha redhat com>
Date: Tue Oct 11 15:22:23 2011 +0200
Bug #661434 - Unfriendly search result
widgets/text/e-text.c | 6 +++++-
widgets/text/e-text.h | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index b57cec8..3724932 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -775,6 +775,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;
@@ -789,6 +790,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;
@@ -798,6 +800,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;
@@ -1310,7 +1313,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,
@@ -3502,6 +3505,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 ef9aefd..aa84553 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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]