diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2011-02-14 14:00:15 +0900 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-05-06 17:05:34 -0400 |
commit | 604292a404edd747374e43e1f7af29ac5e559e1e (patch) | |
tree | d6836921cfc95a4ee48668990409025beecd63ba /gtk/gtktextdisplay.c | |
parent | d399a4acabf9904118ea4481d057bde39bf0ab0e (diff) | |
download | gtk+-604292a404edd747374e43e1f7af29ac5e559e1e.tar.gz |
Fixed textview rendering regression.
Background color was not painted on the whole tagged segment after
line breaking, this was due to the default ->prepare_run() function
wiping the internal PangoColors clean... fixed this by unconditionally
setting local rgba colors from prepare_run instead of comparing them
and bailing out.
Diffstat (limited to 'gtk/gtktextdisplay.c')
-rw-r--r-- | gtk/gtktextdisplay.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index e3ec766dcb..66142f8100 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -132,27 +132,15 @@ text_renderer_set_rgba (GtkTextRenderer *text_renderer, PangoRenderer *renderer = PANGO_RENDERER (text_renderer); PangoColor dummy = { 0, }; - if ((!rgba && !text_renderer->rgba_set[part]) || - (rgba && text_renderer->rgba_set[part] && - text_renderer->rgba[part].red == rgba->red && - text_renderer->rgba[part].green == rgba->green && - text_renderer->rgba[part].blue == rgba->blue && - text_renderer->rgba[part].alpha == rgba->alpha)) - return; - if (rgba) { - text_renderer->rgba_set[part] = TRUE; text_renderer->rgba[part] = *rgba; - pango_renderer_set_color (renderer, part, &dummy); } else - { - text_renderer->rgba_set[part] = FALSE; + pango_renderer_set_color (renderer, part, NULL); - pango_renderer_set_color (renderer, part, NULL); - } + text_renderer->rgba_set[part] = (rgba != NULL); } static GtkTextAppearance * |