[gnome-shell/wip/carlosg/pango-alpha: 3/3] st: Forward CSS foreground alpha as a PangoAttribute to text
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/pango-alpha: 3/3] st: Forward CSS foreground alpha as a PangoAttribute to text
- Date: Fri, 27 Mar 2020 22:48:02 +0000 (UTC)
commit 73472ba6a708b76f72d8b7f21fc3298d025276f7
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Mar 27 23:06:49 2020 +0100
st: Forward CSS foreground alpha as a PangoAttribute to text
Let the PangoRenderer handle this.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2504
src/st/st-private.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/st/st-private.c b/src/st/st-private.c
index db18587c78..e75e10788b 100644
--- a/src/st/st-private.c
+++ b/src/st/st-private.c
@@ -132,6 +132,12 @@ _st_set_text_from_style (ClutterText *text,
color.blue * 255);
pango_attr_list_insert (attribs, foreground);
+ if (color.alpha != 255)
+ {
+ PangoAttribute *alpha = pango_attr_foreground_alpha_new (color.alpha * 255);
+ pango_attr_list_insert (attribs, alpha);
+ }
+
decoration = st_theme_node_get_text_decoration (theme_node);
if (decoration)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]