[gnome-builder/wip/chergert/dspy: 8/11] dspy: tweak colors for parens
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/dspy: 8/11] dspy: tweak colors for parens
- Date: Sun, 14 Apr 2019 20:35:33 +0000 (UTC)
commit c6c1326e1a1f0811c69b49744fa1aae532c9997a
Author: Christian Hergert <chergert redhat com>
Date: Fri Apr 12 14:10:08 2019 -0700
dspy: tweak colors for parens
src/plugins/dspy/dspy-path-model.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/dspy/dspy-path-model.c b/src/plugins/dspy/dspy-path-model.c
index f94fd3876..b4f85cf79 100644
--- a/src/plugins/dspy/dspy-path-model.c
+++ b/src/plugins/dspy/dspy-path-model.c
@@ -62,6 +62,13 @@ arg_name_is_generated (const gchar *str)
return FALSE;
}
+static void
+add_paren (GString *str,
+ gchar paren)
+{
+ g_string_append_printf (str, "<span fgalpha='49000'>%c</span>", paren);
+}
+
static gint
compare_iface (gconstpointer a,
gconstpointer b)
@@ -125,7 +132,7 @@ add_signature (GString *str,
if ((tmp = g_hash_table_lookup (simple_types, signature)))
signature = tmp;
- g_string_append_printf (str, "<span weight='bold' fgalpha='32767'>%s</span>", signature);
+ g_string_append_printf (str, "<span weight='bold' fgalpha='40000'>%s</span>", signature);
}
static gchar *
@@ -165,7 +172,8 @@ method_to_string (GDBusMethodInfo *method)
g_string_append (str, method->name);
- g_string_append (str, " (");
+ g_string_append_c (str, ' ');
+ add_paren (str, '(');
for (guint i = 0; method->in_args[i] != NULL; i++)
{
@@ -183,7 +191,9 @@ method_to_string (GDBusMethodInfo *method)
}
}
- g_string_append (str, ") ↦ (");
+ add_paren (str, ')');
+ g_string_append (str, " ↦ ");
+ add_paren (str, '(');
for (guint i = 0; method->out_args[i] != NULL; i++)
{
@@ -201,7 +211,7 @@ method_to_string (GDBusMethodInfo *method)
}
}
- g_string_append_c (str, ')');
+ add_paren (str, ')');
return g_string_free (str, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]