summaryrefslogtreecommitdiff
path: root/gtk/gtktextattributes.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtktextattributes.c')
-rw-r--r--gtk/gtktextattributes.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/gtk/gtktextattributes.c b/gtk/gtktextattributes.c
index b864f39bd3..dc1360caf5 100644
--- a/gtk/gtktextattributes.c
+++ b/gtk/gtktextattributes.c
@@ -50,6 +50,7 @@
#include "config.h"
#include "gtktextattributes.h"
+#include "gtktextattributesprivate.h"
#include "gtktexttagprivate.h"
/**
@@ -363,9 +364,27 @@ G_GNUC_END_IGNORE_DEPRECATIONS
if (tag->priv->underline_set)
dest->appearance.underline = vals->appearance.underline;
+ if (GTK_TEXT_APPEARANCE_GET_UNDERLINE_RGBA_SET (&vals->appearance))
+ {
+ GdkRGBA rgba;
+
+ GTK_TEXT_APPEARANCE_GET_UNDERLINE_RGBA (&vals->appearance, &rgba);
+ GTK_TEXT_APPEARANCE_SET_UNDERLINE_RGBA (&dest->appearance, &rgba);
+ GTK_TEXT_APPEARANCE_SET_UNDERLINE_RGBA_SET (&dest->appearance, TRUE);
+ }
+
if (tag->priv->strikethrough_set)
dest->appearance.strikethrough = vals->appearance.strikethrough;
+ if (GTK_TEXT_APPEARANCE_GET_STRIKETHROUGH_RGBA_SET (&vals->appearance))
+ {
+ GdkRGBA rgba;
+
+ GTK_TEXT_APPEARANCE_GET_STRIKETHROUGH_RGBA (&vals->appearance, &rgba);
+ GTK_TEXT_APPEARANCE_SET_STRIKETHROUGH_RGBA (&dest->appearance, &rgba);
+ GTK_TEXT_APPEARANCE_SET_STRIKETHROUGH_RGBA_SET (&dest->appearance, TRUE);
+ }
+
if (tag->priv->invisible_set)
dest->invisible = vals->invisible;
@@ -425,5 +444,7 @@ _gtk_text_tag_affects_nonsize_appearance (GtkTextTag *tag)
priv->strikethrough_set ||
priv->bg_full_height_set ||
priv->pg_bg_color_set ||
- priv->fallback_set;
+ priv->fallback_set ||
+ GTK_TEXT_APPEARANCE_GET_UNDERLINE_RGBA_SET (&priv->values->appearance) ||
+ GTK_TEXT_APPEARANCE_GET_STRIKETHROUGH_RGBA_SET (&priv->values->appearance);
}