From 1d8637561d127fb7b87f9eeae8109d64608180b2 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Tue, 14 Jul 2020 22:28:27 +0200 Subject: Extended the theme definitions. --- configure.ac | 3 +- src/glibext/linesegment.c | 2 +- themes/Adwaita/Makefile.am | 4 +- themes/Adwaita/definition.xml | 4 +- themes/Adwaita/display.css | 153 ------------------------------------ themes/Adwaita/gresource.xml | 4 +- themes/Adwaita/tokens-dark.css | 123 +++++++++++++++++++++++++++++ themes/Adwaita/tokens-light.css | 123 +++++++++++++++++++++++++++++ themes/Adwaita/widgets-light.css | 24 ++++++ themes/Adwaita/widgets.css | 24 ------ themes/Makefile.am | 3 +- themes/Solarized/Makefile.am | 6 +- themes/Solarized/definition.xml | 5 +- themes/Solarized/gresource.xml | 5 +- themes/Solarized/segments-dark.css | 61 -------------- themes/Solarized/segments-light.css | 61 -------------- themes/Solarized/segments.css | 48 ----------- themes/Solarized/tokens-dark.css | 130 ++++++++++++++++++++++++++++++ themes/Solarized/tokens-light.css | 130 ++++++++++++++++++++++++++++++ themes/emacs/Makefile.am | 16 ++++ themes/emacs/definition.xml | 15 ++++ themes/emacs/gresource.xml | 9 +++ themes/emacs/palette.css | 19 +++++ themes/emacs/tokens.css | 128 ++++++++++++++++++++++++++++++ themes/emacs/widgets.css | 6 ++ 25 files changed, 744 insertions(+), 362 deletions(-) create mode 100644 themes/Adwaita/tokens-dark.css create mode 100644 themes/Adwaita/tokens-light.css create mode 100644 themes/Adwaita/widgets-light.css delete mode 100644 themes/Adwaita/widgets.css delete mode 100644 themes/Solarized/segments-dark.css delete mode 100644 themes/Solarized/segments-light.css delete mode 100644 themes/Solarized/segments.css create mode 100644 themes/Solarized/tokens-dark.css create mode 100644 themes/Solarized/tokens-light.css create mode 100644 themes/emacs/Makefile.am create mode 100644 themes/emacs/definition.xml create mode 100644 themes/emacs/gresource.xml create mode 100644 themes/emacs/palette.css create mode 100644 themes/emacs/tokens.css create mode 100644 themes/emacs/widgets.css 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 @@ portions.css - widgets.css + tokens-light.css + widgets-light.css + tokens-dark.css widgets-dark.css 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 @@ display.css icons.css portions.css - widgets.css + tokens-light.css + widgets-light.css + tokens-dark.css widgets-dark.css 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-light.css b/themes/Adwaita/widgets-light.css new file mode 100644 index 0000000..6666efb --- /dev/null +++ b/themes/Adwaita/widgets-light.css @@ -0,0 +1,24 @@ + +.graph-block { + + background-color: rgba(0, 0, 0, 0.1); + +} + +.block-palette > image { + + background-image: url('resource:///org/chrysalide/gui/core/images/palette.png'); + +} + +.block-collapse > image { + + background-image: url('resource:///org/chrysalide/gui/core/images/collapse.png'); + +} + +.block-expand > image { + + background-image: url('resource:///org/chrysalide/gui/core/images/expand.png'); + +} diff --git a/themes/Adwaita/widgets.css b/themes/Adwaita/widgets.css deleted file mode 100644 index 6666efb..0000000 --- a/themes/Adwaita/widgets.css +++ /dev/null @@ -1,24 +0,0 @@ - -.graph-block { - - background-color: rgba(0, 0, 0, 0.1); - -} - -.block-palette > image { - - background-image: url('resource:///org/chrysalide/gui/core/images/palette.png'); - -} - -.block-collapse > image { - - background-image: url('resource:///org/chrysalide/gui/core/images/collapse.png'); - -} - -.block-expand > image { - - background-image: url('resource:///org/chrysalide/gui/core/images/expand.png'); - -} 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 @@ palette.css - segments.css + tokens-light.css widgets-light.css - segments-light.css + tokens-dark.css widgets-dark.css - segments-dark.css 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 @@ definition.xml palette.css - segments.css + tokens-light.css widgets-light.css - segments-light.css + tokens-dark.css widgets-dark.css - segments-dark.css 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 @@ + + + + emacs + Cyrille Bagard + Emacs colors for Chrysalide based on http://www.raebear.net/computers/emacs-colors/ + + + + palette.css + tokens.css + widgets.css + + + 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 @@ + + + + definition.xml + palette.css + tokens.css + widgets.css + + 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; + +} -- cgit v0.11.2-87-g4458