summaryrefslogtreecommitdiff
path: root/pango/pango-markup.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-31 13:43:02 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-31 13:43:02 -0400
commit08d372d657368711038f6c9c328cde18a6582123 (patch)
tree67982c019ccf3a72cc248301766a4f2a62ea0d58 /pango/pango-markup.c
parentc750b3678f0ee855777e63174e38c6ea3e543756 (diff)
downloadpango-08d372d657368711038f6c9c328cde18a6582123.tar.gz
pango-color: Tweak semantics of _pango_parse_color_with_alpha
Make it return 0xffff if alpha is not present (this will be more convenient when we use this function in GdkRGBA). Update all users.
Diffstat (limited to 'pango/pango-markup.c')
-rw-r--r--pango/pango-markup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index a67e10fd..5375a8e0 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -1622,7 +1622,7 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED,
goto error;
add_attribute (tag, pango_attr_foreground_new (color.red, color.green, color.blue));
- if (alpha != 0)
+ if (alpha != 0xffff)
add_attribute (tag, pango_attr_foreground_alpha_new (alpha));
}
@@ -1635,7 +1635,7 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED,
goto error;
add_attribute (tag, pango_attr_background_new (color.red, color.green, color.blue));
- if (alpha != 0)
+ if (alpha != 0xffff)
add_attribute (tag, pango_attr_background_alpha_new (alpha));
}