diff options
24 files changed, 720 insertions, 338 deletions
diff --git a/configure.ac b/configure.ac index 09ba2c9..04cb1ef 100644 --- a/configure.ac +++ b/configure.ac @@ -517,7 +517,8 @@ AC_CONFIG_FILES([Makefile tools/d2c/rules/Makefile themes/Makefile themes/Adwaita/Makefile - themes/Solarized/Makefile]) + themes/Solarized/Makefile + themes/emacs/Makefile]) AC_OUTPUT diff --git a/src/glibext/linesegment.c b/src/glibext/linesegment.c index 66744b0..da6fbe2 100644 --- a/src/glibext/linesegment.c +++ b/src/glibext/linesegment.c @@ -45,7 +45,7 @@ /* Nom des éléments CSS */ -#define SEGMENT_NAME(s) "segment-" s +#define SEGMENT_NAME(s) "token-" s static const char *_segment_names[RTT_COUNT] = { diff --git a/themes/Adwaita/Makefile.am b/themes/Adwaita/Makefile.am index dd9b215..fad763a 100644 --- a/themes/Adwaita/Makefile.am +++ b/themes/Adwaita/Makefile.am @@ -5,7 +5,9 @@ GTK3_CSS = \ display.css \ icons.css \ portions.css \ - widgets.css \ + tokens-light.css \ + tokens-dark.css \ + widgets-light.css \ widgets-dark.css \ clean.png \ redo.png \ diff --git a/themes/Adwaita/definition.xml b/themes/Adwaita/definition.xml index b469695..70efbae 100644 --- a/themes/Adwaita/definition.xml +++ b/themes/Adwaita/definition.xml @@ -13,9 +13,11 @@ <path>portions.css</path> </common> <light> - <path>widgets.css</path> + <path>tokens-light.css</path> + <path>widgets-light.css</path> </light> <dark> + <path>tokens-dark.css</path> <path>widgets-dark.css</path> </dark> </resources> diff --git a/themes/Adwaita/display.css b/themes/Adwaita/display.css index 977490d..952dd99 100644 --- a/themes/Adwaita/display.css +++ b/themes/Adwaita/display.css @@ -1,157 +1,4 @@ -.segment-raw { - - color: #000; - - -} - -.segment-comment { - - color: #37b05b; - - -} - -.segment-indication { - - color: #828282; - - font-style: italic; - -} - -.segment-phys-addr-padding { - - color: darker(#7c7c7b); - -} - -.segment-phys-addr { - - color: #7c7c7b; - -} - -.segment-virt-addr-padding { - - color: darker(#7c7c7b); - -} - -.segment-virt-addr { - - color: #7c7c7b; - -} - -.segment-raw-code { - - color: #000; - -} - -.segment-label { - - color: #ffd200; - -} - -.segment-instruction { - - color: #bebebe; - - -} - -.segment-immediate { - - color: #a020f0; - - -} - -.segment-register { - - color: #4141d1; - - -} - -.segment-punct { - - color: #000; - - font-weight: bold; - -} - -.segment-hooks { - - color: #000; - - font-weight: bold; - -} - -.segment-signs { - - color: #000; - - font-weight: bold; - -} - -.segment-ltgt { - - color: #000; - - -} - -.segment-section { - - color: #c80a0a; - - -} - -.segment-segment { - - color: #000; - - -} - -.segment-string { - - color: #cc7e00; - - -} - -.segment-var-name { - - color: #000; - - -} - -.segment-keyword { - - color: #000; - - -} - -.segment-error { - - color: #ff0000; - - font-weight: bold; - -} - .filter-error { color: #f00 diff --git a/themes/Adwaita/gresource.xml b/themes/Adwaita/gresource.xml index 32a8a09..ddefbf6 100644 --- a/themes/Adwaita/gresource.xml +++ b/themes/Adwaita/gresource.xml @@ -6,7 +6,9 @@ <file compressed="true">display.css</file> <file compressed="true">icons.css</file> <file compressed="true">portions.css</file> - <file compressed="true">widgets.css</file> + <file compressed="true">tokens-light.css</file> + <file compressed="true">widgets-light.css</file> + <file compressed="true">tokens-dark.css</file> <file compressed="true">widgets-dark.css</file> </gresource> </gresources> diff --git a/themes/Adwaita/tokens-dark.css b/themes/Adwaita/tokens-dark.css new file mode 100644 index 0000000..78b7f57 --- /dev/null +++ b/themes/Adwaita/tokens-dark.css @@ -0,0 +1,123 @@ + +/* Hex display */ + +.token-raw { + + color: #999; + +} + +.token-raw-full { + + color: #fff; + + font-weight: bold; + +} + +.token-raw-null { + + color: #000; + +} + +.token-printable { + + color: #999; + +} + +.token-not-printable { + + color: #000; + +} + +/* Assembly views */ + +.token-comment, +.token-indication { + + color: #37b05b; + +} + +.token-phys-addr-padding, +.token-virt-addr-padding { + + color: darker(#7c7c7b); + +} + +.token-phys-addr, +.token-virt-addr { + + color: #7c7c7b; + +} + +.token-raw-code, +.token-raw-code-null { + + color: #000; + + +} + +.token-label, +.token-section, +.token-segment { + + color: #ffd200; + +} + +.token-instruction, +.token-keyword { + + color: #bebebe; + +} + +.token-immediate { + + color: #a020f0; + +} + +.token-register { + + color: #4141d1; + +} + +.token-punct, +.token-hooks, +.token-signs, +.token-ltgt { + + color: #000; + + font-weight: bold; + +} + +.token-string { + + color: #cc7e00; + +} + +.token-var-name { + + color: #c50; + +} + +.token-error { + + color: #ff0000; + + font-weight: bold; + +} diff --git a/themes/Adwaita/tokens-light.css b/themes/Adwaita/tokens-light.css new file mode 100644 index 0000000..3485288 --- /dev/null +++ b/themes/Adwaita/tokens-light.css @@ -0,0 +1,123 @@ + +/* Hex display */ + +.token-raw { + + color: #555; + +} + +.token-raw-full { + + color: #000; + + font-weight: bold; + +} + +.token-raw-null { + + color: #ccc; + +} + +.token-printable { + + color: #555; + +} + +.token-not-printable { + + color: #ccc; + +} + +/* Assembly views */ + +.token-comment, +.token-indication { + + color: #37b05b; + +} + +.token-phys-addr-padding, +.token-virt-addr-padding { + + color: #bebebe; + +} + +.token-phys-addr, +.token-virt-addr { + + color: #7c7c7b; + +} + +.token-raw-code, +.token-raw-code-null { + + color: #000; + + +} + +.token-label, +.token-section, +.token-segment { + + color: #d2ad00; + +} + +.token-instruction, +.token-keyword { + + color: darker(#7c7c7b); + +} + +.token-immediate { + + color: #a020f0; + +} + +.token-register { + + color: #4141d1; + +} + +.token-punct, +.token-hooks, +.token-signs, +.token-ltgt { + + color: #000; + + font-weight: bold; + +} + +.token-string { + + color: #cc7e00; + +} + +.token-var-name { + + color: #c50; + +} + +.token-error { + + color: #ff0000; + + font-weight: bold; + +} diff --git a/themes/Adwaita/widgets.css b/themes/Adwaita/widgets-light.css index 6666efb..6666efb 100644 --- a/themes/Adwaita/widgets.css +++ b/themes/Adwaita/widgets-light.css diff --git a/themes/Makefile.am b/themes/Makefile.am index d75b446..7cd7c77 100644 --- a/themes/Makefile.am +++ b/themes/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS = \ Adwaita \ - Solarized + Solarized \ + emacs diff --git a/themes/Solarized/Makefile.am b/themes/Solarized/Makefile.am index 2a4af8b..3df6e8b 100644 --- a/themes/Solarized/Makefile.am +++ b/themes/Solarized/Makefile.am @@ -1,10 +1,10 @@ GTK3_CSS = \ palette.css \ + tokens-light.css \ + tokens-dark.css \ widgets-light.css \ - widgets-dark.css \ - segments.css \ - segments-dark.css + widgets-dark.css solarized.ctm: gresource.xml $(GTK3_CSS) glib-compile-resources --target=$@ --sourcedir=$(srcdir) gresource.xml diff --git a/themes/Solarized/definition.xml b/themes/Solarized/definition.xml index 5fc3e83..24f83de 100644 --- a/themes/Solarized/definition.xml +++ b/themes/Solarized/definition.xml @@ -8,15 +8,14 @@ <resources> <common> <path>palette.css</path> - <path>segments.css</path> </common> <light> + <path>tokens-light.css</path> <path>widgets-light.css</path> - <path>segments-light.css</path> </light> <dark> + <path>tokens-dark.css</path> <path>widgets-dark.css</path> - <path>segments-dark.css</path> </dark> </resources> </ChrysalideTheme> diff --git a/themes/Solarized/gresource.xml b/themes/Solarized/gresource.xml index a12dcba..28b1abd 100644 --- a/themes/Solarized/gresource.xml +++ b/themes/Solarized/gresource.xml @@ -3,10 +3,9 @@ <gresource prefix="/org/chrysalide/gui/themes/Solarized"> <file compressed="true">definition.xml</file> <file compressed="true">palette.css</file> - <file compressed="true">segments.css</file> + <file compressed="true">tokens-light.css</file> <file compressed="true">widgets-light.css</file> - <file compressed="true">segments-light.css</file> + <file compressed="true">tokens-dark.css</file> <file compressed="true">widgets-dark.css</file> - <file compressed="true">segments-dark.css</file> </gresource> </gresources> diff --git a/themes/Solarized/segments-dark.css b/themes/Solarized/segments-dark.css deleted file mode 100644 index 3c9a6fd..0000000 --- a/themes/Solarized/segments-dark.css +++ /dev/null @@ -1,61 +0,0 @@ - -/* Hex display */ - -.segment-raw { - - color: @base1; - -} - -.segment-raw-full { - - color: @base01; - -} - -.segment-raw-null { - - color: @base02; - -} - -.segment-printable { - - color: @base1; - -} - -.segment-not-printable { - - color: @base02; - -} - -/* Assembly views */ - -.segment-phys-addr-padding, -.segment-virt-addr-padding { - - color: @base02; - -} - -.segment-phys-addr, -.segment-virt-addr { - - color: @base01; - -} - -.segment-comment { - - color: @base1; - -} - -.segment-keyword, -.segment-instruction { - - color: @base2; - -} diff --git a/themes/Solarized/segments-light.css b/themes/Solarized/segments-light.css deleted file mode 100644 index 74255e4..0000000 --- a/themes/Solarized/segments-light.css +++ /dev/null @@ -1,61 +0,0 @@ - -/* Hex display */ - -.segment-raw { - - color: @base01; - -} - -.segment-raw-full { - - color: @base1; - -} - -.segment-raw-null { - - color: @base2; - -} - -.segment-printable { - - color: @base01; - -} - -.segment-not-printable { - - color: @base2; - -} - -/* Assembly views */ - -.segment-phys-addr-padding, -.segment-virt-addr-padding { - - color: @base2; - -} - -.segment-phys-addr, -.segment-virt-addr { - - color: @base1; - -} - -.segment-comment { - - color: @base01; - -} - -.segment-keyword, -.segment-instruction { - - color: @base02; - -} diff --git a/themes/Solarized/segments.css b/themes/Solarized/segments.css deleted file mode 100644 index 0391466..0000000 --- a/themes/Solarized/segments.css +++ /dev/null @@ -1,48 +0,0 @@ - -/* Assembly views */ - -.segment-label { - - color: @blue; - -} - -.segment-register { - - color: @violet; - -} - -.segment-immediate { - - color: @orange; - -} - -.segment-string { - - color: @yellow; - -} - -.segment-keyword { - - font-style: italic; - -} - -.segment-punct { - - color: @cyan; - -} - -.segment-hooks, -.segment-ltgt, -.segment-signs { - - color: @cyan; - - font-weight: bold; - -} diff --git a/themes/Solarized/tokens-dark.css b/themes/Solarized/tokens-dark.css new file mode 100644 index 0000000..7272de1 --- /dev/null +++ b/themes/Solarized/tokens-dark.css @@ -0,0 +1,130 @@ + +/* Hex display */ + +.token-raw { + + color: @base1; + +} + +.token-raw-full { + + color: @base2; + + font-weight: bold; + +} + +.token-raw-null { + + color: @base02; + +} + +.token-printable { + + color: @base1; + +} + +.token-not-printable { + + color: @base02; + +} + +/* Assembly views */ + +.token-comment, +.token-indication { + + color: @green; + +} + +.token-phys-addr-padding, +.token-virt-addr-padding { + + color: @base02; + +} + +.token-phys-addr, +.token-virt-addr { + + color: @base01; + +} + +.token-raw-code, +.token-raw-code-null { + + color: @base00; + + +} + +.token-label, +.token-section, +.token-segment { + + color: @blue; + +} + +.token-instruction { + + color: @base3; + +} + +.token-immediate { + + color: @orange; + +} + +.token-register { + + color: @violet; + +} + +.token-punct, +.token-hooks, +.token-signs, +.token-ltgt { + + color: @cyan; + + font-weight: bold; + +} + +.token-string { + + color: @yellow; + +} + +.token-var-name { + + color: @magenta; + +} + +.token-keyword { + + color: @base3; + + font-style: italic; + +} + +.token-error { + + color: @red; + + font-weight: bold; + +} diff --git a/themes/Solarized/tokens-light.css b/themes/Solarized/tokens-light.css new file mode 100644 index 0000000..f5963b2 --- /dev/null +++ b/themes/Solarized/tokens-light.css @@ -0,0 +1,130 @@ + +/* Hex display */ + +.token-raw { + + color: @base01; + +} + +.token-raw-full { + + color: @base02; + + font-weight: bold; + +} + +.token-raw-null { + + color: @base2; + +} + +.token-printable { + + color: @base01; + +} + +.token-not-printable { + + color: @base2; + +} + +/* Assembly views */ + +.token-comment, +.token-indication { + + color: @green; + +} + +.token-phys-addr-padding, +.token-virt-addr-padding { + + color: @base2; + +} + +.token-phys-addr, +.token-virt-addr { + + color: @base1; + +} + +.token-raw-code, +.token-raw-code-null { + + color: @base0; + + +} + +.token-label, +.token-section, +.token-segment { + + color: @blue; + +} + +.token-instruction { + + color: @base03; + +} + +.token-immediate { + + color: @orange; + +} + +.token-register { + + color: @violet; + +} + +.token-punct, +.token-hooks, +.token-signs, +.token-ltgt { + + color: @cyan; + + font-weight: bold; + +} + +.token-string { + + color: @yellow; + +} + +.token-var-name { + + color: @magenta; + +} + +.token-keyword { + + color: @base03; + + font-style: italic; + +} + +.token-error { + + color: @red; + + font-weight: bold; + +} diff --git a/themes/emacs/Makefile.am b/themes/emacs/Makefile.am new file mode 100644 index 0000000..a8b0b80 --- /dev/null +++ b/themes/emacs/Makefile.am @@ -0,0 +1,16 @@ + +GTK3_CSS = \ + palette.css \ + tokens.css \ + widgets.css + +emacs.ctm: gresource.xml $(GTK3_CSS) + glib-compile-resources --target=$@ --sourcedir=$(srcdir) gresource.xml + +css_DATA = emacs.ctm + +cssdir = $(themesdir) + +EXTRA_DIST = $(css_DATA) gresource.xml + +CLEANFILES = $(css_DATA) diff --git a/themes/emacs/definition.xml b/themes/emacs/definition.xml new file mode 100644 index 0000000..c21a90c --- /dev/null +++ b/themes/emacs/definition.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ChrysalideTheme> + <identity> + <name>emacs</name> + <author>Cyrille Bagard</author> + <desc>Emacs colors for Chrysalide based on http://www.raebear.net/computers/emacs-colors/</desc> + </identity> + <resources> + <common> + <path>palette.css</path> + <path>tokens.css</path> + <path>widgets.css</path> + </common> + </resources> +</ChrysalideTheme> diff --git a/themes/emacs/gresource.xml b/themes/emacs/gresource.xml new file mode 100644 index 0000000..010b6a4 --- /dev/null +++ b/themes/emacs/gresource.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/chrysalide/gui/themes/emacs"> + <file compressed="true">definition.xml</file> + <file compressed="true">palette.css</file> + <file compressed="true">tokens.css</file> + <file compressed="true">widgets.css</file> + </gresource> +</gresources> diff --git a/themes/emacs/palette.css b/themes/emacs/palette.css new file mode 100644 index 0000000..3c4c2c5 --- /dev/null +++ b/themes/emacs/palette.css @@ -0,0 +1,19 @@ + +@define-color DarkSlateGray #2f4f4f; + +@define-color DarkSalmon #e9967a; +@define-color Khaki #f0e68c; +@define-color MediumSeaGreen #3cb371; + +@define-color Sienna #a0522d; +@define-color Peru #cd853f; +@define-color Chocolate #d2691e; +@define-color DeepSkyBlue #00bfff; +@define-color WhiteSmoke #f5f5f5; +@define-color HotPink #ff69b4; +@define-color LimeGreen #32cd32; +@define-color Wheat #f5deb3; +@define-color GoldenRod #daa520; +@define-color OrangeRed #ff4500; +@define-color MediumPurple #9370db; +@define-color VioletRed #d02090; diff --git a/themes/emacs/tokens.css b/themes/emacs/tokens.css new file mode 100644 index 0000000..5245549 --- /dev/null +++ b/themes/emacs/tokens.css @@ -0,0 +1,128 @@ + +/* Hex display */ + +.token-raw { + + color: @Khaki; + +} + +.token-raw-full { + + color: @DarkSalmon; + + font-weight: bold; + +} + +.token-raw-null { + + color: @MediumSeaGreen; + +} + +.token-printable { + + color: @Khaki; + +} + +.token-not-printable { + + color: @MediumSeaGreen; + +} + +/* Assembly views */ + +.token-comment, +.token-indication { + + color: @Chocolate; + +} + +.token-phys-addr-padding, +.token-virt-addr-padding { + + color: @Sienna; + +} + +.token-phys-addr, +.token-virt-addr { + + color: @Peru; + +} + +.token-raw-code { + + color: @Khaki; + +} + +.token-raw-code-null { + + color: @MediumSeaGreen; + +} + +.token-label, +.token-section, +.token-segment { + + color: @DeepSkyBlue; + +} + +.token-instruction { + + color: @WhiteSmoke; + +} + +.token-immediate { + + color: @HotPink; + +} + +.token-register { + + color: @LimeGreen; + +} + +.token-punct, +.token-hooks, +.token-signs, +.token-ltgt { + + color: @Wheat; + +} + +.token-string { + + color: @GoldenRod; + +} + +.token-var-name { + + color: @OrangeRed; + +} + +.token-keyword { + + color: @MediumPurple; + +} + +.token-error { + + color: @VioletRed; + +} diff --git a/themes/emacs/widgets.css b/themes/emacs/widgets.css new file mode 100644 index 0000000..46f8e36 --- /dev/null +++ b/themes/emacs/widgets.css @@ -0,0 +1,6 @@ + +.graph-block-background { + + background-color: @DarkSlateGray; + +} |