mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
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.
This commit is contained in:
parent
d399a4acab
commit
604292a404
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user