Commit 604292a4 authored by Tristan Van Berkom's avatar Tristan Van Berkom Committed by Matthias Clasen

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.
parent d399a4ac
......@@ -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 *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment