[gnome-builder] buffer: adjust diagnostic highlight styling
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] buffer: adjust diagnostic highlight styling
- Date: Sun, 17 May 2015 08:19:49 +0000 (UTC)
commit 58d798fa8b6ec2cee762797c3d8da1ca5d70cb34
Author: Christian Hergert <christian hergert me>
Date: Sun May 17 01:19:31 2015 -0700
buffer: adjust diagnostic highlight styling
- Ensure proper tag table priority
- Add colors for the various levels
- Diagnostic is gray now, it's shouldn't be "hotter" than warning
- Use blue squiggles for notes
Of course, we need to make our "tag sync" stuff more general so we can
use that here once we bump to gtksourceview 3.17.
libide/ide-buffer.c | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
---
diff --git a/libide/ide-buffer.c b/libide/ide-buffer.c
index 4d38998..3b07c44 100644
--- a/libide/ide-buffer.c
+++ b/libide/ide-buffer.c
@@ -794,27 +794,43 @@ ide_buffer_constructed (GObject *object)
{
IdeBuffer *self = (IdeBuffer *)object;
IdeBufferPrivate *priv = ide_buffer_get_instance_private (self);
- GdkRGBA warning_rgba;
GdkRGBA deprecated_rgba;
+ GdkRGBA error_rgba;
+ GdkRGBA note_rgba;
+ GdkRGBA warning_rgba;
G_OBJECT_CLASS (ide_buffer_parent_class)->constructed (object);
+ /*
+ * TODO: Once we bump to GtkSourceView 3.17, these should be extracted
+ * from the style scheme (or use the style scheme directly).
+ */
+ gdk_rgba_parse (&deprecated_rgba, "#babdb6");
+ gdk_rgba_parse (&error_rgba, "#ff0000");
+ gdk_rgba_parse (¬e_rgba, "#708090");
gdk_rgba_parse (&warning_rgba, "#fcaf3e");
- gdk_rgba_parse (&deprecated_rgba, "#f57900");
- gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_ERROR,
+ /*
+ * NOTE:
+ *
+ * The tag table assigns priority upon insert. Each successive insert
+ * is higher priority than the last.
+ */
+ gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_NOTE,
"underline", PANGO_UNDERLINE_ERROR,
+ "underline-rgba", ¬e_rgba,
NULL);
- gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_NOTE,
- "underline", PANGO_UNDERLINE_SINGLE,
+ gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_DEPRECATED,
+ "underline", PANGO_UNDERLINE_ERROR,
+ "underline-rgba", &deprecated_rgba,
NULL);
gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_WARNING,
"underline", PANGO_UNDERLINE_ERROR,
"underline-rgba", &warning_rgba,
NULL);
- gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_DEPRECATED,
+ gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_ERROR,
"underline", PANGO_UNDERLINE_ERROR,
- "underline-rgba", &deprecated_rgba,
+ "underline-rgba", &error_rgba,
NULL);
priv->highlight_engine = ide_highlight_engine_new (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]