[gnome-builder/wip/gtk4-port: 1237/1774] plugins/spellcheck: track changes in spell adapter




commit a4572aa3d6d2028d308da21e0b6b5733f11ba62e
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 31 13:00:31 2022 -0700

    plugins/spellcheck: track changes in spell adapter

 src/plugins/spellcheck/editor-text-buffer-spell-adapter.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c 
b/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c
index 61b7433c9..c1ba6738e 100644
--- a/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c
+++ b/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c
@@ -387,12 +387,17 @@ apply_error_style_cb (GtkSourceBuffer *buffer,
 {
   GtkSourceStyleScheme *scheme;
   GtkSourceStyle *style;
+  static GdkRGBA error_color;
 
   g_assert (GTK_SOURCE_IS_BUFFER (buffer));
   g_assert (GTK_IS_TEXT_TAG (tag));
 
+  if G_UNLIKELY (error_color.alpha == .0)
+    gdk_rgba_parse (&error_color, "#e01b24");
+
   g_object_set (tag,
-                "underline", PANGO_UNDERLINE_ERROR,
+                "underline", PANGO_UNDERLINE_ERROR_LINE,
+                "underline-rgba", &error_color,
                 "background-set", FALSE,
                 "foreground-set", FALSE,
                 "weight-set", FALSE,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]