cogl-pango: Special case alpha of 0

pango_renderer_get_alpha() returns 0 to indicate that the alpha value
should be inherited from the environment, but we are passing it on
(and therefore making the text fully translucent).

Instead, make the text fully opaque as expected.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1156
This commit is contained in:
Florian Müllner 2020-03-28 01:01:10 +01:00
parent fed5f4d9aa
commit ed10aea44d

View File

@ -730,7 +730,7 @@ cogl_pango_renderer_set_color_for_part (PangoRenderer *renderer,
pango_color->red >> 8,
pango_color->green >> 8,
pango_color->blue >> 8,
alpha >> 8);
alpha ? alpha >> 8 : 0xff);
_cogl_pango_display_list_set_color_override (priv->display_list, &color);
}