aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-16 10:06:57 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-16 10:06:57 +0800
commit17bc3ae168964c0d60aa3ab38c2d2db50f01b4fa (patch)
tree65952f46da33301f5880b24528dc5f7ea50f5985 /widgets
parentc0d763a702f850c0653e98e951b3de4a8d3c2c06 (diff)
downloadgsoc2013-evolution-17bc3ae168964c0d60aa3ab38c2d2db50f01b4fa.tar.gz
gsoc2013-evolution-17bc3ae168964c0d60aa3ab38c2d2db50f01b4fa.tar.zst
gsoc2013-evolution-17bc3ae168964c0d60aa3ab38c2d2db50f01b4fa.zip
Made setting the rgba color work even if you're using the non-aa canvas
2001-04-15 Christopher James Lahey <clahey@ximian.com> * gal/e-text/e-text.c: Made setting the rgba color work even if you're using the non-aa canvas (except for the a.) svn path=/trunk/; revision=9337
Diffstat (limited to 'widgets')
-rw-r--r--widgets/text/e-text.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 0de86fbec2..e59bde6b7f 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1378,10 +1378,7 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
(color.green & 0xff00) << 8 |
(color.blue & 0xff00) |
0xff);
- text->color = color;
color_changed = TRUE;
- text->needs_redraw = 1;
- needs_update = 1;
break;
case ARG_FILL_COLOR_GDK:
@@ -1394,17 +1391,15 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
(color.green & 0xff00) << 8 |
(color.blue & 0xff00) |
0xff);
- text->color = color;
color_changed = TRUE;
- text->needs_redraw = 1;
- needs_update = 1;
break;
case ARG_FILL_COLOR_RGBA:
text->rgba = GTK_VALUE_UINT (*arg);
+ color.red = ((text->rgba >> 24) & 0xff) * 0x101;
+ color.green = ((text->rgba >> 16) & 0xff) * 0x101;
+ color.blue = ((text->rgba >> 8) & 0xff) * 0x101;
color_changed = TRUE;
- text->needs_redraw = 1;
- needs_update = 1;
break;
case ARG_FILL_STIPPLE:
@@ -1511,9 +1506,13 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
if (GNOME_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS(item))
gdk_color_context_query_color (item->canvas->cc, &color);
+ text->color = color;
+
if (!item->canvas->aa)
set_text_gc_foreground (text);
+ text->needs_redraw = 1;
+ needs_update = 1;
}
if ( needs_reflow )