[gnome-builder/wip/gtk4-port: 778/1774] style-schemes: homogenize style prefixes for Builder
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 778/1774] style-schemes: homogenize style prefixes for Builder
- Date: Mon, 11 Jul 2022 22:31:23 +0000 (UTC)
commit cdc5b09b841034304d9c2d500af1017b771c29ae
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 27 15:37:43 2022 -0700
style-schemes: homogenize style prefixes for Builder
data/style-schemes/builder-dark.xml | 45 +++++++++-------------
data/style-schemes/builder.xml | 40 ++++++++++---------
src/libide/code/ide-buffer.c | 16 ++++----
.../sourceview/ide-line-change-gutter-renderer.c | 6 +--
src/plugins/omni-gutter/gbp-omni-gutter-renderer.c | 24 ++++++------
src/plugins/xml-pack/ide-xml-parser.c | 2 +-
6 files changed, 63 insertions(+), 70 deletions(-)
---
diff --git a/data/style-schemes/builder-dark.xml b/data/style-schemes/builder-dark.xml
index cc3d51ca1..e358a840a 100644
--- a/data/style-schemes/builder-dark.xml
+++ b/data/style-schemes/builder-dark.xml
@@ -81,24 +81,24 @@
<style name="draw-spaces" foreground="aluminium5"/>
<style name="background-pattern" background="#202020"/>
<style name="map-overlay" background="#rgba(136,138,133,0.25)"/>
-
- <!-- Diagnostics Underlining -->
- <style name="diagnostician::deprecated" underline="error" underline-color="aluminium3"/>
- <style name="diagnostician::unused" underline="error" underline-color="chocolate2"/>
- <style name="diagnostician::error" underline="error" underline-color="red1"/>
- <style name="diagnostician::note" underline="error" underline-color="skyblue1"/>
- <style name="diagnostician::warning" underline="error" underline-color="orange1"/>
-
- <!-- Snippets -->
- <style name="snippet::tab-stop" background="orange3" foreground="aluminium6"/>
- <style name="snippet::area" background="#rgba(86,114,151,.5)"/>
-
- <!-- Debugger -->
- <style name="debugger::current-breakpoint" foreground="#2e3436" background="#fcaf3e"/>
- <style name="debugger::breakpoint" foreground="#ffffff" background="#204a87"/>
-
- <!-- Hover links -->
- <style name="action::hover-definition" background="#41464c" underline="true"/>
+ <style name="snippet-focus" background="orange3" foreground="aluminium6"/>
+
+ <!-- Builder Overrides -->
+ <style name="-Builder:deprecated" underline="error" underline-color="aluminium3"/>
+ <style name="-Builder:unused" underline="error" underline-color="chocolate2"/>
+ <style name="-Builder:error" underline="error" underline-color="red1"/>
+ <style name="-Builder:note" underline="error" underline-color="skyblue1"/>
+ <style name="-Builder:warning" underline="error" underline-color="orange1"/>
+ <style name="-Builder:current-breakpoint" foreground="#2e3436" background="#fcaf3e"/>
+ <style name="-Builder:breakpoint" foreground="#ffffff" background="#204a87"/>
+ <style name="-Builder:hover-definition" background="#41464c" underline="true"/>
+ <style name="-Builder:label" foreground="#000000" background="#D5E7FC"/>
+ <style name="-Builder:id" foreground="#000000" background="#D9E7BD"/>
+ <style name="-Builder:style-class" foreground="#000000" background="#DFCD9B"/>
+ <style name="-Builder:type" foreground="#000000" background="#F4DAC3"/>
+ <style name="-Builder:parent" foreground="#000000" background="#DEBECF"/>
+ <style name="-Builder:class" foreground="#000000" background="#FFEF98"/>
+ <style name="-Builder:attribute" foreground="#000000" background="#F0E68C"/>
<!-- Bracket Matching -->
<style name="bracket-match" foreground="chocolate2" bold="true"/>
@@ -221,14 +221,5 @@
<style name="xml:attribute-value" foreground="#669900"/>
<style name="xml:tag-match" background="#rgba(114,159,207,.20)"/>
- <!-- Symbol-tree xml-pack coloring -->
- <style name="symboltree::label" foreground="#000000" background="#D5E7FC"/>
- <style name="symboltree::id" foreground="#000000" background="#D9E7BD"/>
- <style name="symboltree::style-class" foreground="#000000" background="#DFCD9B"/>
- <style name="symboltree::type" foreground="#000000" background="#F4DAC3"/>
- <style name="symboltree::parent" foreground="#000000" background="#DEBECF"/>
- <style name="symboltree::class" foreground="#000000" background="#FFEF98"/>
- <style name="symboltree::attribute" foreground="#000000" background="#F0E68C"/>
-
</style-scheme>
diff --git a/data/style-schemes/builder.xml b/data/style-schemes/builder.xml
index 0998ad3a5..0da58863c 100644
--- a/data/style-schemes/builder.xml
+++ b/data/style-schemes/builder.xml
@@ -90,8 +90,29 @@
<style name="search-match" background="pink1" foreground="white"/>
<style name="search-shadow" background="#rgba(0,0,0,0.2)"/>
<style name="selection" background="selection1"/>
+ <style name="snippet-focus" background="orange1" foreground="text1"/>
<style name="text" background="#FAFAFA" foreground="text1"/>
+ <!-- Builder Overrides -->
+ <style name="-Builder:added-line" foreground="chameleon1"/>
+ <style name="-Builder:changed-line" foreground="orange1"/>
+ <style name="-Builder:removed-line" foreground="scarletred1"/>
+ <style name="-Builder:breakpoint" background="#4A90D9" foreground="white"/>
+ <style name="-Builder:deprecated" underline="error" underline-color="aluminium3"/>
+ <style name="-Builder:error" underline="error" underline-color="red1"/>
+ <style name="-Builder:note" underline="error" underline-color="blue1"/>
+ <style name="-Builder:unused" underline="error" underline-color="chocolate3"/>
+ <style name="-Builder:warning" underline="error" underline-color="orange1"/>
+ <style name="-Builder:hover-definition" background="#D2E0E8" underline="single"/>
+ <style name="-Builder:area" background="#rgba(32,74,135,0.1)"/>
+ <style name="-Builder:attribute" background="#F0E68C" foreground="#000000"/>
+ <style name="-Builder:class" background="#FFEF98" foreground="#000000"/>
+ <style name="-Builder:id" background="#D9E7BD" foreground="#000000"/>
+ <style name="-Builder:label" background="#D5E7FC" foreground="#000000"/>
+ <style name="-Builder:parent" background="#DEBECF" foreground="#000000"/>
+ <style name="-Builder:style-class" background="#DFCD9B" foreground="#000000"/>
+ <style name="-Builder:type" background="#F4DAC3" foreground="#000000"/>
+
<!-- Defaults -->
<style name="def:base-n-integer" foreground="blue2"/>
<style name="def:boolean" foreground="pink1"/>
@@ -127,7 +148,6 @@
<style name="def:thematic-break" foreground="gr1" bold="true"/>
<style name="def:type" foreground="gr1" bold="true"/>
<style name="def:warning" background="yellow1"/>
- <style name="action::hover-definition" background="#D2E0E8" underline="single"/>
<!-- C -->
<style name="c:boolean" foreground="blue2"/>
@@ -140,12 +160,6 @@
<style name="c:storage-class" foreground="orange3" bold="true"/>
<style name="c:string" foreground="green1"/>
<style name="c:type" foreground="green1" bold="true"/>
- <style name="debugger::breakpoint" background="#4A90D9" foreground="white"/>
- <style name="diagnostician::deprecated" underline="error" underline-color="aluminium3"/>
- <style name="diagnostician::error" underline="error" underline-color="red1"/>
- <style name="diagnostician::note" underline="error" underline-color="blue1"/>
- <style name="diagnostician::unused" underline="error" underline-color="chocolate3"/>
- <style name="diagnostician::warning" underline="error" underline-color="orange1"/>
<!-- Diff -->
<style name="diff:added-line" foreground="chameleon3"/>
@@ -166,9 +180,6 @@
<style name="gtk-doc:signal-name" bold="true"/>
<style name="gtk-doc:since" bold="true"/>
<style name="gtk-doc:type" bold="true"/>
- <style name="gutter:added-line" foreground="chameleon1"/>
- <style name="gutter:changed-line" foreground="orange1"/>
- <style name="gutter:removed-line" foreground="scarletred1"/>
<!-- JavaScript -->
<style name="js:built-in-constructor" foreground="pink1"/>
@@ -193,15 +204,6 @@
<!-- sh -->
<style name="sh:variable" foreground="plum3"/>
<style name="sh:variable-definition" foreground="chameleon3"/>
- <style name="snippet::area" background="#rgba(32,74,135,0.1)"/>
- <style name="snippet::tab-stop" background="orange1" foreground="text1"/>
- <style name="symboltree::attribute" background="#F0E68C" foreground="#000000"/>
- <style name="symboltree::class" background="#FFEF98" foreground="#000000"/>
- <style name="symboltree::id" background="#D9E7BD" foreground="#000000"/>
- <style name="symboltree::label" background="#D5E7FC" foreground="#000000"/>
- <style name="symboltree::parent" background="#DEBECF" foreground="#000000"/>
- <style name="symboltree::style-class" background="#DFCD9B" foreground="#000000"/>
- <style name="symboltree::type" background="#F4DAC3" foreground="#000000"/>
<!-- XML -->
<style name="xml:namespace" bold="true"/>
diff --git a/src/libide/code/ide-buffer.c b/src/libide/code/ide-buffer.c
index 4abebadb6..0cc53ffcd 100644
--- a/src/libide/code/ide-buffer.c
+++ b/src/libide/code/ide-buffer.c
@@ -50,14 +50,14 @@
#define SETTLING_DELAY_MSEC 333
-#define TAG_ERROR "diagnostician::error"
-#define TAG_WARNING "diagnostician::warning"
-#define TAG_DEPRECATED "diagnostician::deprecated"
-#define TAG_UNUSED "diagnostician::unused"
-#define TAG_NOTE "diagnostician::note"
-#define TAG_SNIPPET_TAB_STOP "snippet::tab-stop"
-#define TAG_DEFINITION "action::hover-definition"
-#define TAG_CURRENT_BKPT "debugger::current-breakpoint"
+#define TAG_ERROR "-Builder:error"
+#define TAG_WARNING "-Builder:warning"
+#define TAG_DEPRECATED "-Builder:deprecated"
+#define TAG_UNUSED "-Builder:unused"
+#define TAG_NOTE "-Builder:note"
+#define TAG_SNIPPET_TAB_STOP "-Builder:tab-stop"
+#define TAG_DEFINITION "-Builder:hover-definition"
+#define TAG_CURRENT_BKPT "-Builder:current-breakpoint"
#define DEPRECATED_COLOR "#babdb6"
#define UNUSED_COLOR "#c17d11"
diff --git a/src/libide/sourceview/ide-line-change-gutter-renderer.c
b/src/libide/sourceview/ide-line-change-gutter-renderer.c
index 25d3516a2..1fe45c2e9 100644
--- a/src/libide/sourceview/ide-line-change-gutter-renderer.c
+++ b/src/libide/sourceview/ide-line-change-gutter-renderer.c
@@ -162,13 +162,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))
+ if (!get_style_rgba (scheme, "-Builder:added-line", FOREGROUND, &self->changes.add))
gdk_rgba_parse (&self->changes.add, IDE_LINE_CHANGES_FALLBACK_ADDED);
- if (!get_style_rgba (scheme, "gutter::changed-line", FOREGROUND, &self->changes.change))
+ if (!get_style_rgba (scheme, "-Builder:changed-line", FOREGROUND, &self->changes.change))
gdk_rgba_parse (&self->changes.change, IDE_LINE_CHANGES_FALLBACK_CHANGED);
- if (!get_style_rgba (scheme, "gutter::removed-line", FOREGROUND, &self->changes.remove))
+ if (!get_style_rgba (scheme, "-Builder:removed-line", FOREGROUND, &self->changes.remove))
gdk_rgba_parse (&self->changes.remove, IDE_LINE_CHANGES_FALLBACK_REMOVED);
}
diff --git a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
index b2a8046d8..84bc62c04 100644
--- a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
+++ b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
@@ -470,47 +470,47 @@ reload_style_colors (GbpOmniGutterRenderer *self,
if (!style_get_is_bold (scheme, "current-line-number", &self->current.bold))
self->current.bold = TRUE;
- /* These gutter:: prefix values come from Builder's style-scheme xml
+ /* These -0uilder: prefix values come from Builder's style-scheme xml
* files, but other style schemes may also support them now too.
*/
- if (!get_style_rgba (scheme, "gutter::added-line", FOREGROUND, &self->changes.add) &&
+ if (!get_style_rgba (scheme, "-Builder:added-line", FOREGROUND, &self->changes.add) &&
!get_style_rgba (scheme, "diff:added-line", FOREGROUND, &self->changes.add))
gdk_rgba_parse (&self->changes.add, IDE_LINE_CHANGES_FALLBACK_ADDED);
- if (!get_style_rgba (scheme, "gutter::changed-line", FOREGROUND, &self->changes.change) &&
+ if (!get_style_rgba (scheme, "-Builder:changed-line", FOREGROUND, &self->changes.change) &&
!get_style_rgba (scheme, "diff:changed-line", FOREGROUND, &self->changes.change))
gdk_rgba_parse (&self->changes.change, IDE_LINE_CHANGES_FALLBACK_CHANGED);
- if (!get_style_rgba (scheme, "gutter::removed-line", FOREGROUND, &self->changes.remove) &&
+ if (!get_style_rgba (scheme, "-Builder:removed-line", FOREGROUND, &self->changes.remove) &&
!get_style_rgba (scheme, "diff:removed-line", FOREGROUND, &self->changes.remove))
gdk_rgba_parse (&self->changes.remove, IDE_LINE_CHANGES_FALLBACK_REMOVED);
/*
- * These debugger:: prefix values come from Builder's style-scheme xml
+ * These -Builder: prefix values come from Builder's style-scheme xml
* as well as in the IdeBuffer class. Other style schemes may also
* support them, though.
*/
- if (!get_style_rgba (scheme, "debugger::current-breakpoint", BACKGROUND, &self->stopped_bg))
+ if (!get_style_rgba (scheme, "-Builder:current-breakpoint", BACKGROUND, &self->stopped_bg))
gdk_rgba_parse (&self->stopped_bg, IDE_LINE_CHANGES_FALLBACK_CHANGED);
- if (!get_style_rgba (scheme, "debugger::breakpoint", FOREGROUND, &self->bkpt.fg) &&
+ if (!get_style_rgba (scheme, "-Builder:breakpoint", FOREGROUND, &self->bkpt.fg) &&
!get_style_rgba (scheme, "selection", FOREGROUND, &self->bkpt.fg))
self->bkpt.fg = fg;
- if (!get_style_rgba (scheme, "debugger::breakpoint", BACKGROUND, &self->bkpt.bg) &&
+ if (!get_style_rgba (scheme, "-Builder:breakpoint", BACKGROUND, &self->bkpt.bg) &&
!get_style_rgba (scheme, "selection", BACKGROUND, &self->bkpt.bg))
{
gdk_rgba_parse (&self->bkpt.bg, "#1c71d8");
gdk_rgba_parse (&self->bkpt.fg, "#ffffff");
}
- if (!style_get_is_bold (scheme, "debugger::breakpoint", &self->bkpt.bold))
+ if (!style_get_is_bold (scheme, "-Builder:breakpoint", &self->bkpt.bold))
self->bkpt.bold = TRUE;
/* Slight different color for countpoint, fallback to mix(selection,diff:add) */
- if (!get_style_rgba (scheme, "debugger::countpoint", FOREGROUND, &self->ctpt.fg))
+ if (!get_style_rgba (scheme, "-Builder:countpoint", FOREGROUND, &self->ctpt.fg))
get_style_rgba (scheme, "selection", FOREGROUND, &self->ctpt.fg);
- if (!get_style_rgba (scheme, "debugger::countpoint", BACKGROUND, &self->ctpt.bg))
+ if (!get_style_rgba (scheme, "-Builder:countpoint", BACKGROUND, &self->ctpt.bg))
{
if (!get_style_rgba (scheme, "selection", BACKGROUND, &self->ctpt.bg))
self->ctpt.bg = self->bkpt.bg;
@@ -519,7 +519,7 @@ reload_style_colors (GbpOmniGutterRenderer *self,
self->ctpt.bg.green = (self->ctpt.bg.green + self->changes.add.green) / 2.0;
self->ctpt.bg.blue = (self->ctpt.bg.blue + self->changes.add.blue) / 2.0;
}
- if (!style_get_is_bold (scheme, "debugger::countpoint", &self->ctpt.bold))
+ if (!style_get_is_bold (scheme, "-Builder:countpoint", &self->ctpt.bold))
self->ctpt.bold = FALSE;
}
diff --git a/src/plugins/xml-pack/ide-xml-parser.c b/src/plugins/xml-pack/ide-xml-parser.c
index 3d8d8abe1..0dd237003 100644
--- a/src/plugins/xml-pack/ide-xml-parser.c
+++ b/src/plugins/xml-pack/ide-xml-parser.c
@@ -747,7 +747,7 @@ init_color_tags (IdeXmlParser *self)
tag_set = FALSE;
if (scheme != NULL)
{
- tag_name = g_strconcat ("symboltree::", tag_ptr->name, NULL);
+ tag_name = g_strconcat ("-Builder:", tag_ptr->name, NULL);
if (NULL != (style = gtk_source_style_scheme_get_style (scheme, tag_name)))
{
g_object_get (style, "foreground", &foreground, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]