[gnome-builder/wip/gtk4-port] libide/sourceview: tweak various fallback colors



commit f58ad95f9f500b00e1d2b66d20124f777b24f5e7
Author: Christian Hergert <chergert redhat com>
Date:   Wed Apr 27 15:28:14 2022 -0700

    libide/sourceview: tweak various fallback colors

 src/libide/sourceview/ide-line-change-gutter-renderer.c | 6 +++---
 src/libide/sourceview/ide-line-change-gutter-renderer.h | 4 ++++
 src/plugins/omni-gutter/gbp-omni-gutter-renderer.c      | 8 ++++----
 3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/libide/sourceview/ide-line-change-gutter-renderer.c 
b/src/libide/sourceview/ide-line-change-gutter-renderer.c
index 57954e11b..25d3516a2 100644
--- a/src/libide/sourceview/ide-line-change-gutter-renderer.c
+++ b/src/libide/sourceview/ide-line-change-gutter-renderer.c
@@ -163,13 +163,13 @@ connect_style_scheme (IdeLineChangeGutterRenderer *self)
   scheme = gtk_source_buffer_get_style_scheme (GTK_SOURCE_BUFFER (buffer));
 
   if (!get_style_rgba (scheme, "gutter::added-line", FOREGROUND, &self->changes.add))
-    gdk_rgba_parse (&self->changes.add, "#8ae234");
+    gdk_rgba_parse (&self->changes.add, IDE_LINE_CHANGES_FALLBACK_ADDED);
 
   if (!get_style_rgba (scheme, "gutter::changed-line", FOREGROUND, &self->changes.change))
-    gdk_rgba_parse (&self->changes.change, "#fcaf3e");
+    gdk_rgba_parse (&self->changes.change, IDE_LINE_CHANGES_FALLBACK_CHANGED);
 
   if (!get_style_rgba (scheme, "gutter::removed-line", FOREGROUND, &self->changes.remove))
-    gdk_rgba_parse (&self->changes.remove, "#ef2929");
+    gdk_rgba_parse (&self->changes.remove, IDE_LINE_CHANGES_FALLBACK_REMOVED);
 }
 
 static void
diff --git a/src/libide/sourceview/ide-line-change-gutter-renderer.h 
b/src/libide/sourceview/ide-line-change-gutter-renderer.h
index 1d86ddf63..00e575411 100644
--- a/src/libide/sourceview/ide-line-change-gutter-renderer.h
+++ b/src/libide/sourceview/ide-line-change-gutter-renderer.h
@@ -28,6 +28,10 @@ G_BEGIN_DECLS
 
 #define IDE_TYPE_LINE_CHANGE_GUTTER_RENDERER (ide_line_change_gutter_renderer_get_type())
 
+#define IDE_LINE_CHANGES_FALLBACK_ADDED   "#26a269"
+#define IDE_LINE_CHANGES_FALLBACK_CHANGED "#e5a50a"
+#define IDE_LINE_CHANGES_FALLBACK_REMOVED "#c01c28"
+
 IDE_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (IdeLineChangeGutterRenderer, ide_line_change_gutter_renderer, IDE, 
LINE_CHANGE_GUTTER_RENDERER, GtkSourceGutterRenderer)
 
diff --git a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c 
b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
index 537bc791a..b2a8046d8 100644
--- a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
+++ b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
@@ -475,15 +475,15 @@ reload_style_colors (GbpOmniGutterRenderer *self,
    */
   if (!get_style_rgba (scheme, "gutter::added-line", FOREGROUND, &self->changes.add) &&
       !get_style_rgba (scheme, "diff:added-line", FOREGROUND, &self->changes.add))
-    gdk_rgba_parse (&self->changes.add, "#8ae234");
+    gdk_rgba_parse (&self->changes.add, IDE_LINE_CHANGES_FALLBACK_ADDED);
 
   if (!get_style_rgba (scheme, "gutter::changed-line", FOREGROUND, &self->changes.change) &&
       !get_style_rgba (scheme, "diff:changed-line", FOREGROUND, &self->changes.change))
-    gdk_rgba_parse (&self->changes.change, "#fcaf3e");
+    gdk_rgba_parse (&self->changes.change, IDE_LINE_CHANGES_FALLBACK_CHANGED);
 
   if (!get_style_rgba (scheme, "gutter::removed-line", FOREGROUND, &self->changes.remove) &&
       !get_style_rgba (scheme, "diff:removed-line", FOREGROUND, &self->changes.remove))
-    gdk_rgba_parse (&self->changes.remove, "#ef2929");
+    gdk_rgba_parse (&self->changes.remove, IDE_LINE_CHANGES_FALLBACK_REMOVED);
 
   /*
    * These debugger:: prefix values come from Builder's style-scheme xml
@@ -491,7 +491,7 @@ reload_style_colors (GbpOmniGutterRenderer *self,
    * support them, though.
    */
   if (!get_style_rgba (scheme, "debugger::current-breakpoint", BACKGROUND, &self->stopped_bg))
-    gdk_rgba_parse (&self->stopped_bg, "#fcaf3e");
+    gdk_rgba_parse (&self->stopped_bg, IDE_LINE_CHANGES_FALLBACK_CHANGED);
 
   if (!get_style_rgba (scheme, "debugger::breakpoint", FOREGROUND, &self->bkpt.fg) &&
       !get_style_rgba (scheme, "selection", FOREGROUND, &self->bkpt.fg))


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