From 91cc5e6c9c13f71815c40b87d6c3b4e7ee9fd9c5 Mon Sep 17 00:00:00 2001 From: Natestah Date: Sat, 22 Jun 2024 09:26:25 -0700 Subject: [PATCH] some minor updates to theme -Light High Contrast - bases with VS.json -Update to handle null includes --- src/TextMateSharp.Grammars/Resources/Themes/hc_light.json | 1 + src/TextMateSharp.Grammars/Resources/Themes/light_vs.json | 2 +- src/TextMateSharp/Themes/Theme.cs | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/TextMateSharp.Grammars/Resources/Themes/hc_light.json b/src/TextMateSharp.Grammars/Resources/Themes/hc_light.json index 83a4083..8704efb 100644 --- a/src/TextMateSharp.Grammars/Resources/Themes/hc_light.json +++ b/src/TextMateSharp.Grammars/Resources/Themes/hc_light.json @@ -1,6 +1,7 @@ { "$schema": "vscode://schemas/color-theme", "name": "Light High Contrast", + "include": "./light_vs.json", "tokenColors": [ { "scope": ["meta.embedded", "source.groovy.embedded"], diff --git a/src/TextMateSharp.Grammars/Resources/Themes/light_vs.json b/src/TextMateSharp.Grammars/Resources/Themes/light_vs.json index d88e6ff..6d1cc42 100644 --- a/src/TextMateSharp.Grammars/Resources/Themes/light_vs.json +++ b/src/TextMateSharp.Grammars/Resources/Themes/light_vs.json @@ -36,7 +36,7 @@ "string meta.image.inline.markdown" ], "settings": { - "foreground": "#000000ff" + "foreground": "#000000" } }, { diff --git a/src/TextMateSharp/Themes/Theme.cs b/src/TextMateSharp/Themes/Theme.cs index 1fbaee9..395f939 100644 --- a/src/TextMateSharp/Themes/Theme.cs +++ b/src/TextMateSharp/Themes/Theme.cs @@ -34,7 +34,10 @@ public static Theme CreateFromRawTheme( // First get colors from include, then try and overwrite with local colors.. // I don't see this happening currently, but here just in case that ever happens. - ParsedTheme.ParsedGuiColors(themeInclude, guiColorsDictionary); + if (themeInclude != null) + { + ParsedTheme.ParsedGuiColors(themeInclude, guiColorsDictionary); + } ParsedTheme.ParsedGuiColors(source, guiColorsDictionary); return new Theme(colorMap, theme, include, guiColorsDictionary);