Browse Source

Cleanup, make everything explicit

Colors won't be inherited from the xshd files in order to avoid mistakes.
pull/2906/head
Lucas Trzesniewski 2 years ago
parent
commit
caeb880a35
  1. 72
      ILSpy/Languages/CSharpHighlightingTokenWriter.cs
  2. 1
      ILSpy/TextView/CSharp-Mode.xshd
  3. 6
      ILSpy/TextView/DecompilerTextView.cs
  4. 69
      ILSpy/Themes/Base.Dark.xaml
  5. 61
      ILSpy/Themes/Base.Light.xaml
  6. 8
      ILSpy/Themes/SyntaxColor.cs
  7. 69
      ILSpy/Themes/Theme.Dark.xaml
  8. 123
      ILSpy/Themes/Theme.Light.xaml
  9. 12
      ILSpy/Themes/Theme.RSharpDark.xaml
  10. 12
      ILSpy/Themes/Theme.RSharpLight.xaml
  11. 10
      ILSpy/Themes/Theme.VSCodeDarkPlus.xaml
  12. 10
      ILSpy/Themes/Theme.VSCodeLightPlus.xaml
  13. 6
      ILSpy/Themes/ThemeManager.cs

72
ILSpy/Languages/CSharpHighlightingTokenWriter.cs

@ -77,49 +77,43 @@ namespace ICSharpCode.ILSpy @@ -77,49 +77,43 @@ namespace ICSharpCode.ILSpy
this.locatable = locatable;
this.textOutput = textOutput;
this.visibilityKeywordsColor = GetColor("Visibility") ?? GetColor("Keywords");
this.namespaceKeywordsColor = GetColor("NamespaceKeywords") ?? GetColor("Keywords");
this.structureKeywordsColor = GetColor("Keywords");
this.gotoKeywordsColor = GetColor("GotoKeywords") ?? GetColor("Keywords");
this.queryKeywordsColor = GetColor("QueryKeywords") ?? GetColor("Keywords");
this.exceptionKeywordsColor = GetColor("ExceptionKeywords") ?? GetColor("Keywords");
this.checkedKeywordColor = GetColor("CheckedKeyword") ?? GetColor("Keywords");
this.unsafeKeywordsColor = GetColor("UnsafeKeywords") ?? GetColor("Keywords");
this.valueTypeKeywordsColor = GetColor("ValueTypeKeywords") ?? GetColor("Keywords");
this.referenceTypeKeywordsColor = GetColor("ReferenceTypeKeywords") ?? GetColor("Keywords");
this.operatorKeywordsColor = GetColor("OperatorKeywords") ?? GetColor("Keywords");
this.parameterModifierColor = GetColor("ParameterModifiers") ?? GetColor("Keywords");
this.modifiersColor = GetColor("Modifiers") ?? GetColor("Keywords");
this.accessorKeywordsColor = GetColor("GetSetAddRemove") ?? GetColor("Keywords");
this.visibilityKeywordsColor = highlighting.GetNamedColor("Visibility");
this.namespaceKeywordsColor = highlighting.GetNamedColor("NamespaceKeywords");
this.structureKeywordsColor = highlighting.GetNamedColor("Keywords");
this.gotoKeywordsColor = highlighting.GetNamedColor("GotoKeywords");
this.queryKeywordsColor = highlighting.GetNamedColor("QueryKeywords");
this.exceptionKeywordsColor = highlighting.GetNamedColor("ExceptionKeywords");
this.checkedKeywordColor = highlighting.GetNamedColor("CheckedKeyword");
this.unsafeKeywordsColor = highlighting.GetNamedColor("UnsafeKeywords");
this.valueTypeKeywordsColor = highlighting.GetNamedColor("ValueTypeKeywords");
this.referenceTypeKeywordsColor = highlighting.GetNamedColor("ReferenceTypeKeywords");
this.operatorKeywordsColor = highlighting.GetNamedColor("OperatorKeywords");
this.parameterModifierColor = highlighting.GetNamedColor("ParameterModifiers");
this.modifiersColor = highlighting.GetNamedColor("Modifiers");
this.accessorKeywordsColor = highlighting.GetNamedColor("GetSetAddRemove");
this.referenceTypeColor = GetColor("ReferenceTypes") ?? GetColor("Types");
this.valueTypeColor = GetColor("ValueTypes") ?? GetColor("Types");
this.interfaceTypeColor = GetColor("InterfaceTypes") ?? GetColor("Types");
this.enumerationTypeColor = GetColor("EnumTypes") ?? GetColor("Types");
this.typeParameterTypeColor = GetColor("TypeParameters") ?? GetColor("Types");
this.delegateTypeColor = GetColor("DelegateTypes") ?? GetColor("Types");
this.methodDeclarationColor = GetColor("MethodDeclaration") ?? GetColor("MethodCall");
this.methodCallColor = GetColor("MethodCall") ?? GetColor("MethodDeclaration");
this.fieldDeclarationColor = GetColor("FieldDeclaration") ?? GetColor("FieldAccess");
this.fieldAccessColor = GetColor("FieldAccess") ?? GetColor("FieldDeclaration");
this.propertyDeclarationColor = GetColor("PropertyDeclaration") ?? GetColor("PropertyAccess");
this.propertyAccessColor = GetColor("PropertyAccess") ?? GetColor("PropertyDeclaration");
this.eventDeclarationColor = GetColor("EventDeclaration") ?? GetColor("EventAccess");
this.eventAccessColor = GetColor("EventAccess") ?? GetColor("EventDeclaration");
this.referenceTypeColor = highlighting.GetNamedColor("ReferenceTypes");
this.valueTypeColor = highlighting.GetNamedColor("ValueTypes");
this.interfaceTypeColor = highlighting.GetNamedColor("InterfaceTypes");
this.enumerationTypeColor = highlighting.GetNamedColor("EnumTypes");
this.typeParameterTypeColor = highlighting.GetNamedColor("TypeParameters");
this.delegateTypeColor = highlighting.GetNamedColor("DelegateTypes");
this.methodDeclarationColor = highlighting.GetNamedColor("MethodDeclaration");
this.methodCallColor = highlighting.GetNamedColor("MethodCall");
this.fieldDeclarationColor = highlighting.GetNamedColor("FieldDeclaration");
this.fieldAccessColor = highlighting.GetNamedColor("FieldAccess");
this.propertyDeclarationColor = highlighting.GetNamedColor("PropertyDeclaration");
this.propertyAccessColor = highlighting.GetNamedColor("PropertyAccess");
this.eventDeclarationColor = highlighting.GetNamedColor("EventDeclaration");
this.eventAccessColor = highlighting.GetNamedColor("EventAccess");
//this.variableDeclarationColor = this.variableAccessColor = defaultTextColor;
//this.parameterDeclarationColor = this.parameterAccessColor = defaultTextColor;
this.valueKeywordColor = GetColor("NullOrValueKeywords") ?? GetColor("Keywords");
this.thisKeywordColor = GetColor("ThisOrBaseReference") ?? GetColor("Keywords");
this.trueKeywordColor = GetColor("TrueFalse") ?? GetColor("Keywords");
this.typeKeywordsColor = GetColor("TypeKeywords") ?? GetColor("Keywords");
this.attributeKeywordsColor = GetColor("AttributeKeywords") ?? GetColor("Keywords");
this.valueKeywordColor = highlighting.GetNamedColor("NullOrValueKeywords");
this.thisKeywordColor = highlighting.GetNamedColor("ThisOrBaseReference");
this.trueKeywordColor = highlighting.GetNamedColor("TrueFalse");
this.typeKeywordsColor = highlighting.GetNamedColor("TypeKeywords");
this.attributeKeywordsColor = highlighting.GetNamedColor("AttributeKeywords");
//this.externAliasKeywordColor = ...;
HighlightingColor GetColor(string colorName)
{
var color = highlighting.GetNamedColor(colorName);
return color is not { Foreground: null, Background: null, FontFamily: null, FontWeight: null, FontSize: null, FontStyle: null, Strikethrough: null, Underline: null } ? color : null;
}
}
public override void WriteKeyword(Role role, string keyword)

1
ILSpy/TextView/CSharp-Mode.xshd

@ -33,7 +33,6 @@ @@ -33,7 +33,6 @@
<Color name="AttributeKeywords" foreground="Navy" exampleText="[assembly: AssemblyVersion(&quot;1.0.0.*&quot;)]" />
<!-- Colors used for semantic highlighting -->
<Color name="Types" exampleText="System.#{#Uri#}# uri;"/>
<Color name="ReferenceTypes" foreground="#004085" exampleText="System.#{#Uri#}# uri;"/>
<Color name="InterfaceTypes" foreground="#004085" exampleText="System.#{#IDisposable#}# obj;"/>
<Color name="TypeParameters" foreground="#004085" exampleText="class MyList&lt;#{#T#}#&gt; { }"/>

6
ILSpy/TextView/DecompilerTextView.cs

@ -140,10 +140,6 @@ namespace ICSharpCode.ILSpy.TextView @@ -140,10 +140,6 @@ namespace ICSharpCode.ILSpy.TextView
ShowLineMargin();
SetHighlightCurrentLine();
// add marker service & margin
textEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService);
textEditor.TextArea.TextView.LineTransformers.Add(textMarkerService);
ContextMenuProvider.Add(this);
textEditor.TextArea.TextView.SetResourceReference(ICSharpCode.AvalonEdit.Rendering.TextView.LinkTextForegroundBrushProperty, ResourceKeys.LinkTextForegroundBrush);
@ -1377,7 +1373,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -1377,7 +1373,7 @@ namespace ICSharpCode.ILSpy.TextView
using (XmlTextReader reader = new XmlTextReader(resourceStream))
{
var highlightingDefinition = HighlightingLoader.Load(reader, manager);
ThemeManager.Current.UpdateColors(highlightingDefinition);
ThemeManager.Current.ApplyHighlightingColors(highlightingDefinition);
return highlightingDefinition;
}
});

69
ILSpy/Themes/Base.Dark.xaml

@ -0,0 +1,69 @@ @@ -0,0 +1,69 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:styles="urn:TomsToolbox.Wpf.Styles"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/AvalonDock.Themes.VS2013;component/darktheme.xaml" />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextBackgroundBrush}" Color="Black" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextForegroundBrush}" Color="White" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.SearchResultBackgroundBrush}" Color="#995A23" />
<Color x:Key="{x:Static SystemColors.ControlLightLightColorKey}">#333337</Color>
<Color x:Key="{x:Static SystemColors.ControlLightColorKey}">#464646</Color>
<Color x:Key="{x:Static SystemColors.ControlColorKey}">#252526</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkColorKey}">#686868</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkDarkColorKey}">#9E9E9E</Color>
<Color x:Key="{x:Static SystemColors.ControlTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.GrayTextColorKey}">#999999</Color>
<Color x:Key="{x:Static SystemColors.HighlightColorKey}">#3399FF</Color>
<Color x:Key="{x:Static SystemColors.HighlightTextColorKey}">#FFFFFF</Color>
<Color x:Key="{x:Static SystemColors.InfoTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.InfoColorKey}">#333337</Color>
<Color x:Key="{x:Static SystemColors.MenuColorKey}">#1B1B1C</Color>
<Color x:Key="{x:Static SystemColors.MenuBarColorKey}">#1B1B1C</Color>
<Color x:Key="{x:Static SystemColors.MenuTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.WindowColorKey}">#333337</Color>
<Color x:Key="{x:Static SystemColors.WindowTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionColorKey}">#2D2D30</Color>
<Color x:Key="{x:Static SystemColors.ActiveBorderColorKey}">#007ACC</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionColorKey}">#2D2D30</Color>
<Color x:Key="{x:Static SystemColors.InactiveBorderColorKey}">#434346</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionTextColorKey}">#808080</Color>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.BracketHighlightBackgroundBrush}" Color="#443399FF" />
<Pen x:Key="{x:Static themes:ResourceKeys.BracketHighlightBorderPen}" Brush="#883399FF" Thickness="1" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightLightBrushKey}" Color="#333337" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightBrushKey}" Color="#464646" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#252526" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkBrushKey}" Color="#686868" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#9E9E9E" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.GrayTextBrushKey}" Color="#999999" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#3399FF" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FFFFFF" />
<SolidColorBrush x:Key="{x:Static SystemColors.InfoTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.InfoBrushKey}" Color="#333337" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBrushKey}" Color="#1B1B1C" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBarBrushKey}" Color="#1B1B1C" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="#333337" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionBrushKey}" Color="#2D2D30" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveBorderBrushKey}" Color="#007ACC" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionBrushKey}" Color="#2D2D30" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveBorderBrushKey}" Color="#434346" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionTextBrushKey}" Color="#808080" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.BorderBrush}" Color="#464646" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.DisabledBrush}" Color="#2D2D30" />
<Color x:Key="{x:Static themes:ResourceKeys.TextMarkerBackgroundColor}">MediumVioletRed</Color>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.LinkTextForegroundBrush}">CornflowerBlue</SolidColorBrush>
<styles:InvertGrayEffect x:Key="{x:Static themes:ResourceKeys.ThemeAwareButtonEffect}" />
</ResourceDictionary>

61
ILSpy/Themes/Base.Light.xaml

@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:styles="urn:TomsToolbox.Wpf.Styles"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/AvalonDock.Themes.VS2013;component/lighttheme.xaml" />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextBackgroundBrush}" Color="White" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextForegroundBrush}" Color="Black" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.SearchResultBackgroundBrush}">LightGreen</SolidColorBrush>
<Color x:Key="{x:Static SystemColors.ControlLightLightColorKey}">#FCFCFC</Color>
<Color x:Key="{x:Static SystemColors.ControlLightColorKey}">#D8D8E0</Color>
<Color x:Key="{x:Static SystemColors.ControlColorKey}">#F5F5F5</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkColorKey}">#C2C3C9</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkDarkColorKey}">#686868</Color>
<Color x:Key="{x:Static SystemColors.ControlTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.GrayTextColorKey}">#717171</Color>
<Color x:Key="{x:Static SystemColors.HighlightColorKey}">#3399FF</Color>
<Color x:Key="{x:Static SystemColors.HighlightTextColorKey}">#FFFFFF</Color>
<Color x:Key="{x:Static SystemColors.MenuColorKey}">#F6F6F6</Color>
<Color x:Key="{x:Static SystemColors.MenuBarColorKey}">#F6F6F6</Color>
<Color x:Key="{x:Static SystemColors.MenuTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.WindowColorKey}">#FFFFFF</Color>
<Color x:Key="{x:Static SystemColors.WindowTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionColorKey}">#EEEEF2</Color>
<Color x:Key="{x:Static SystemColors.ActiveBorderColorKey}">#71BDE2</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionColorKey}">#EEEEF2</Color>
<Color x:Key="{x:Static SystemColors.InactiveBorderColorKey}">#CCCEDB</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionTextColorKey}">#808080</Color>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.BracketHighlightBackgroundBrush}" Color="#160000FF" />
<Pen x:Key="{x:Static themes:ResourceKeys.BracketHighlightBorderPen}" Brush="#340000FF" Thickness="1" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightLightBrushKey}" Color="#FCFCFC" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightBrushKey}" Color="#D8D8E0" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#F5F5F5" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkBrushKey}" Color="#C2C3C9" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#686868" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.GrayTextBrushKey}" Color="#717171" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#3399FF" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FFFFFF" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBrushKey}" Color="#F6F6F6" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBarBrushKey}" Color="#F6F6F6" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="#FFFFFF" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionBrushKey}" Color="#EEEEF2" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveBorderBrushKey}" Color="#71BDE2" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionBrushKey}" Color="#EEEEF2" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveBorderBrushKey}" Color="#CCCEDB" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionTextBrushKey}" Color="#808080" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.BorderBrush}" Color="#CCCEDB" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.DisabledBrush}" Color="#EEEEF2" />
</ResourceDictionary>

8
ILSpy/Themes/SyntaxColor.cs

@ -21,4 +21,12 @@ public class SyntaxColor @@ -21,4 +21,12 @@ public class SyntaxColor
color.FontWeight = FontWeight ?? FontWeights.Normal;
color.FontStyle = FontStyle ?? FontStyles.Normal;
}
public static void ResetColor(HighlightingColor color)
{
color.Foreground = null;
color.Background = null;
color.FontWeight = null;
color.FontStyle = null;
}
}

69
ILSpy/Themes/Theme.Dark.xaml

@ -1,71 +1,14 @@ @@ -1,71 +1,14 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:styles="urn:TomsToolbox.Wpf.Styles"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/AvalonDock.Themes.VS2013;component/darktheme.xaml" />
<ResourceDictionary Source="Base.Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextBackgroundBrush}" Color="#333337" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextForegroundBrush}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.SearchResultBackgroundBrush}" Color="#995A23" />
<Color x:Key="{x:Static SystemColors.ControlLightLightColorKey}">#333337</Color>
<Color x:Key="{x:Static SystemColors.ControlLightColorKey}">#464646</Color>
<Color x:Key="{x:Static SystemColors.ControlColorKey}">#252526</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkColorKey}">#686868</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkDarkColorKey}">#9E9E9E</Color>
<Color x:Key="{x:Static SystemColors.ControlTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.GrayTextColorKey}">#999999</Color>
<Color x:Key="{x:Static SystemColors.HighlightColorKey}">#3399FF</Color>
<Color x:Key="{x:Static SystemColors.HighlightTextColorKey}">#FFFFFF</Color>
<Color x:Key="{x:Static SystemColors.InfoTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.InfoColorKey}">#333337</Color>
<Color x:Key="{x:Static SystemColors.MenuColorKey}">#1B1B1C</Color>
<Color x:Key="{x:Static SystemColors.MenuBarColorKey}">#1B1B1C</Color>
<Color x:Key="{x:Static SystemColors.MenuTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.WindowColorKey}">#333337</Color>
<Color x:Key="{x:Static SystemColors.WindowTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionColorKey}">#2D2D30</Color>
<Color x:Key="{x:Static SystemColors.ActiveBorderColorKey}">#007ACC</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionTextColorKey}">#F1F1F1</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionColorKey}">#2D2D30</Color>
<Color x:Key="{x:Static SystemColors.InactiveBorderColorKey}">#434346</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionTextColorKey}">#808080</Color>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.BracketHighlightBackgroundBrush}" Color="#443399FF" />
<Pen x:Key="{x:Static themes:ResourceKeys.BracketHighlightBorderPen}" Brush="#883399FF" Thickness="1" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightLightBrushKey}" Color="#333337" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightBrushKey}" Color="#464646" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#252526" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkBrushKey}" Color="#686868" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#9E9E9E" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.GrayTextBrushKey}" Color="#999999" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#3399FF" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FFFFFF" />
<SolidColorBrush x:Key="{x:Static SystemColors.InfoTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.InfoBrushKey}" Color="#333337" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBrushKey}" Color="#1B1B1C" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBarBrushKey}" Color="#1B1B1C" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="#333337" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionBrushKey}" Color="#2D2D30" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveBorderBrushKey}" Color="#007ACC" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionTextBrushKey}" Color="#F1F1F1" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionBrushKey}" Color="#2D2D30" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveBorderBrushKey}" Color="#434346" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionTextBrushKey}" Color="#808080" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.BorderBrush}" Color="#464646" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.DisabledBrush}" Color="#2D2D30" />
<Color x:Key="{x:Static themes:ResourceKeys.TextMarkerBackgroundColor}">MediumVioletRed</Color>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.LinkTextForegroundBrush}">CornflowerBlue</SolidColorBrush>
<styles:InvertGrayEffect x:Key="{x:Static themes:ResourceKeys.ThemeAwareButtonEffect}" />
<!-- ILAsm -->
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Comment" Foreground="#FF57A64A" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.String" Foreground="#FFD69D85" />
@ -73,6 +16,7 @@ @@ -73,6 +16,7 @@
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Keywords" Foreground="#FFD69D85" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Directives" Foreground="#FF57A64A" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Security" Foreground="#FF559CD6" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Label" />
<!-- Asm -->
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Comment" Foreground="#FF57A64A" />
@ -84,6 +28,7 @@ @@ -84,6 +28,7 @@
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Registers" Foreground="#8080FF" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Directives" Foreground="#FFD69D85" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Directive Operands" Foreground="#FFb5cea8" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Address and Bytes" />
<!-- CSharp -->
<themes:SyntaxColor x:Key="SyntaxColor.C#.Comment" Foreground="#FF57A64A" />
@ -119,8 +64,14 @@ @@ -119,8 +64,14 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.DelegateTypes" Foreground="#569CD6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypes" FontWeight="Bold" Foreground="#569CD6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EnumTypes" FontWeight="Bold" Foreground="#569CD6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodDeclaration" Foreground="#FFdcdcaa" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodCall" Foreground="#FFdcdcaa" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldDeclaration" FontStyle="Italic" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldAccess" FontStyle="Italic" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyDeclaration" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyAccess" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventDeclaration" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventAccess" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.InactiveCode" Foreground="Gray" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.SemanticError" Foreground="DarkRed" />
@ -135,4 +86,4 @@ @@ -135,4 +86,4 @@
<themes:SyntaxColor x:Key="SyntaxColor.XML.Entity" Foreground="#FFd8a0df" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.BrokenEntity" Foreground="#FF559CD6" />
</ResourceDictionary>
</ResourceDictionary>

123
ILSpy/Themes/Theme.Light.xaml

@ -1,60 +1,89 @@ @@ -1,60 +1,89 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:styles="urn:TomsToolbox.Wpf.Styles"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/AvalonDock.Themes.VS2013;component/lighttheme.xaml" />
<ResourceDictionary Source="Base.Light.xaml" />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextBackgroundBrush}" Color="{DynamicResource {x:Static SystemColors.InfoColorKey}}" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextForegroundBrush}" Color="{DynamicResource {x:Static SystemColors.InfoTextColorKey}}" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.SearchResultBackgroundBrush}" Color="LightGreen" />
<Color x:Key="{x:Static SystemColors.ControlLightLightColorKey}">#FCFCFC</Color>
<Color x:Key="{x:Static SystemColors.ControlLightColorKey}">#D8D8E0</Color>
<Color x:Key="{x:Static SystemColors.ControlColorKey}">#F5F5F5</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkColorKey}">#C2C3C9</Color>
<Color x:Key="{x:Static SystemColors.ControlDarkDarkColorKey}">#686868</Color>
<Color x:Key="{x:Static SystemColors.ControlTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.GrayTextColorKey}">#717171</Color>
<Color x:Key="{x:Static SystemColors.HighlightColorKey}">#3399FF</Color>
<Color x:Key="{x:Static SystemColors.HighlightTextColorKey}">#FFFFFF</Color>
<Color x:Key="{x:Static SystemColors.MenuColorKey}">#F6F6F6</Color>
<Color x:Key="{x:Static SystemColors.MenuBarColorKey}">#F6F6F6</Color>
<Color x:Key="{x:Static SystemColors.MenuTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.WindowColorKey}">#FFFFFF</Color>
<Color x:Key="{x:Static SystemColors.WindowTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionColorKey}">#EEEEF2</Color>
<Color x:Key="{x:Static SystemColors.ActiveBorderColorKey}">#71BDE2</Color>
<Color x:Key="{x:Static SystemColors.ActiveCaptionTextColorKey}">#1E1E1E</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionColorKey}">#EEEEF2</Color>
<Color x:Key="{x:Static SystemColors.InactiveBorderColorKey}">#CCCEDB</Color>
<Color x:Key="{x:Static SystemColors.InactiveCaptionTextColorKey}">#808080</Color>
<!-- ILAsm -->
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Comment" Foreground="Green" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.String" Foreground="Magenta" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Instructions" Foreground="Blue" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Keywords" Foreground="Blue" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Directives" Foreground="Green" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Security" Foreground="Red" />
<themes:SyntaxColor x:Key="SyntaxColor.ILAsm.Label" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.BracketHighlightBackgroundBrush}" Color="#160000FF" />
<Pen x:Key="{x:Static themes:ResourceKeys.BracketHighlightBorderPen}" Brush="#340000FF" Thickness="1" />
<!-- Asm -->
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Comment" Foreground="Green" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.NumberLiteral" Foreground="Orange" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.String" Foreground="Magenta" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Instructions" Foreground="Blue" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Math Instructions" Foreground="#0080C0" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Extended Instructions" Foreground="Brown" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Registers" Foreground="#8080FF" Background="#EEEEEE" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Directives" Foreground="Blue" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Directive Operands" Foreground="DarkBlue" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.Asm.Address and Bytes" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightLightBrushKey}" Color="#FCFCFC" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlLightBrushKey}" Color="#D8D8E0" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#F5F5F5" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkBrushKey}" Color="#C2C3C9" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#686868" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.GrayTextBrushKey}" Color="#717171" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#3399FF" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FFFFFF" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBrushKey}" Color="#F6F6F6" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBarBrushKey}" Color="#F6F6F6" />
<SolidColorBrush x:Key="{x:Static SystemColors.MenuTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="#FFFFFF" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionBrushKey}" Color="#EEEEF2" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveBorderBrushKey}" Color="#71BDE2" />
<SolidColorBrush x:Key="{x:Static SystemColors.ActiveCaptionTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionBrushKey}" Color="#EEEEF2" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveBorderBrushKey}" Color="#CCCEDB" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveCaptionTextBrushKey}" Color="#808080" />
<!-- CSharp -->
<themes:SyntaxColor x:Key="SyntaxColor.C#.Comment" Foreground="Green" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.String" Foreground="Blue" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.StringInterpolation" Foreground="Black" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Char" Foreground="Magenta" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Preprocessor" Foreground="Green" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypeKeywords" Foreground="Red" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ReferenceTypeKeywords" Foreground="Red" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.NumberLiteral" Foreground="DarkBlue" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ThisOrBaseReference" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.NullOrValueKeywords" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Keywords" Foreground="Blue" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.GotoKeywords" Foreground="Navy" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.QueryKeywords" Foreground="Navy" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ExceptionKeywords" Foreground="Teal" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.CheckedKeyword" Foreground="DarkGray" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.UnsafeKeywords" Foreground="Olive" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.OperatorKeywords" Foreground="Pink" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ParameterModifiers" Foreground="DeepPink" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Modifiers" Foreground="Brown" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Visibility" Foreground="Blue" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.NamespaceKeywords" Foreground="Green" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.GetSetAddRemove" Foreground="SaddleBrown" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.TrueFalse" Foreground="DarkCyan" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.TypeKeywords" Foreground="DarkCyan" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.AttributeKeywords" Foreground="Navy" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.BorderBrush}" Color="#CCCEDB" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.DisabledBrush}" Color="#EEEEF2" />
</ResourceDictionary>
<themes:SyntaxColor x:Key="SyntaxColor.C#.ReferenceTypes" Foreground="#004085" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.InterfaceTypes" Foreground="#004085" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.TypeParameters" Foreground="#004085" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.DelegateTypes" Foreground="#004085" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypes" FontWeight="Bold" Foreground="#004085" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EnumTypes" FontWeight="Bold" Foreground="#004085" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodDeclaration" Foreground="MidnightBlue" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodCall" Foreground="MidnightBlue" FontWeight="Bold" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldDeclaration" FontStyle="Italic" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldAccess" FontStyle="Italic" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyDeclaration" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyAccess" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventDeclaration" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventAccess" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.InactiveCode" Foreground="Gray" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.SemanticError" Foreground="DarkRed" />
<!-- XML -->
<themes:SyntaxColor x:Key="SyntaxColor.XML.Comment" Foreground="Green" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.CData" Foreground="Blue" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.DocType" Foreground="Blue" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.XmlDeclaration" Foreground="Blue" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.XmlTag" Foreground="DarkMagenta" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.AttributeName" Foreground="Red" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.AttributeValue" Foreground="Blue" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.Entity" Foreground="Teal" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.BrokenEntity" Foreground="Olive" />
</ResourceDictionary>

12
ILSpy/Themes/Theme.RSharpDark.xaml

@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Theme.Dark.xaml" />
<ResourceDictionary Source="Base.Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Inspired from the ReSharper Dark theme, with changes -->
<!-- Inspired from the ReSharper Dark theme, with some changes -->
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextBackgroundBrush}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextForegroundBrush}" Color="#DCDCDC" />
@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.StringInterpolation" Foreground="#80FF80" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Char" Foreground="#D69D85" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Preprocessor" Foreground="#569CD6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" Foreground="#DCDCDC" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypeKeywords" Foreground="#569CD6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ReferenceTypeKeywords" Foreground="#569CD6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.NumberLiteral" Foreground="#B5CEA8" />
@ -69,9 +69,13 @@ @@ -69,9 +69,13 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.DelegateTypes" Foreground="#ADD8E6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypes" Foreground="#ADB0E6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EnumTypes" Foreground="#ADB0E6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodDeclaration" Foreground="#00FFFF" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodCall" Foreground="#00FFFF" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldDeclaration" Foreground="#C4ADE6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldAccess" Foreground="#C4ADE6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyDeclaration" Foreground="#C4ADE6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyAccess" Foreground="#C4ADE6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventDeclaration" Foreground="#DDA0DD" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventAccess" Foreground="#DDA0DD" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.InactiveCode" Foreground="#A9A9A9" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.SemanticError" Foreground="#FF3333" />
@ -87,4 +91,4 @@ @@ -87,4 +91,4 @@
<themes:SyntaxColor x:Key="SyntaxColor.XML.Entity" Foreground="#92CAF4" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.BrokenEntity" Foreground="#92CAF4" />
</ResourceDictionary>
</ResourceDictionary>

12
ILSpy/Themes/Theme.RSharpLight.xaml

@ -2,10 +2,10 @@ @@ -2,10 +2,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Theme.Light.xaml" />
<ResourceDictionary Source="Base.Light.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Inspired from the ReSharper Light theme, with changes -->
<!-- Inspired from the ReSharper Light theme, with some changes -->
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextBackgroundBrush}" Color="White" />
<SolidColorBrush x:Key="{x:Static themes:ResourceKeys.TextForegroundBrush}" Color="Black" />
@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.StringInterpolation" Foreground="#008000" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Char" Foreground="#A31515" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Preprocessor" Foreground="#0000FF" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" Foreground="#000000" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypeKeywords" Foreground="#0000FF" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ReferenceTypeKeywords" Foreground="#0000FF" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.NumberLiteral" Foreground="#000000" />
@ -69,9 +69,13 @@ @@ -69,9 +69,13 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.DelegateTypes" Foreground="#00008B" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypes" Foreground="#3F008F" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EnumTypes" Foreground="#3F008F" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodDeclaration" Foreground="#008B8B" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodCall" Foreground="#008B8B" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldDeclaration" Foreground="#660E7A" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldAccess" Foreground="#660E7A" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyDeclaration" Foreground="#660E7A" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyAccess" Foreground="#660E7A" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventDeclaration" Foreground="#FF00FF" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventAccess" Foreground="#FF00FF" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.InactiveCode" Foreground="#A9A9A9" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.SemanticError" Foreground="#FF0000" />
@ -87,4 +91,4 @@ @@ -87,4 +91,4 @@
<themes:SyntaxColor x:Key="SyntaxColor.XML.Entity" Foreground="#FF0000" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.BrokenEntity" Foreground="#FF0000" />
</ResourceDictionary>
</ResourceDictionary>

10
ILSpy/Themes/Theme.VSCodeDarkPlus.xaml

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Theme.Dark.xaml" />
<ResourceDictionary Source="Base.Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
<!--
@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.StringInterpolation" Foreground="#d16969" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Char" Foreground="#ce9178" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Preprocessor" Foreground="#569cd6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" Foreground="#D4D4D4" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypeKeywords" Foreground="#569cd6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ReferenceTypeKeywords" Foreground="#569cd6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.NumberLiteral" Foreground="#b5cea8" />
@ -74,9 +74,13 @@ @@ -74,9 +74,13 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.DelegateTypes" Foreground="#4EC9B0" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypes" Foreground="#4EC9B0" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EnumTypes" Foreground="#4EC9B0" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodDeclaration" Foreground="#DCDCAA" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodCall" Foreground="#DCDCAA" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldDeclaration" Foreground="#9CDCFE" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldAccess" Foreground="#9CDCFE" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyDeclaration" Foreground="#9CDCFE" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyAccess" Foreground="#9CDCFE" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventDeclaration" Foreground="#9CDCFE" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventAccess" Foreground="#9CDCFE" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.InactiveCode" Foreground="#A6A6A6" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.SemanticError" Foreground="#f44747" />
@ -92,4 +96,4 @@ @@ -92,4 +96,4 @@
<themes:SyntaxColor x:Key="SyntaxColor.XML.Entity" Foreground="#b5cea8" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.BrokenEntity" Foreground="#f44747" />
</ResourceDictionary>
</ResourceDictionary>

10
ILSpy/Themes/Theme.VSCodeLightPlus.xaml

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Theme.Light.xaml" />
<ResourceDictionary Source="Base.Light.xaml" />
</ResourceDictionary.MergedDictionaries>
<!--
@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.StringInterpolation" Foreground="#d16969" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Char" Foreground="#a31515" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Preprocessor" Foreground="#0000ff" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" Foreground="Black" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.Punctuation" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypeKeywords" Foreground="#0000ff" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ReferenceTypeKeywords" Foreground="#0000ff" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.NumberLiteral" Foreground="#098658" />
@ -74,9 +74,13 @@ @@ -74,9 +74,13 @@
<themes:SyntaxColor x:Key="SyntaxColor.C#.DelegateTypes" Foreground="#267f99" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.ValueTypes" Foreground="#267f99" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EnumTypes" Foreground="#267f99" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodDeclaration" Foreground="#795E26" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.MethodCall" Foreground="#795E26" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldDeclaration" Foreground="#001080" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.FieldAccess" Foreground="#001080" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyDeclaration" Foreground="#001080" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.PropertyAccess" Foreground="#001080" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventDeclaration" Foreground="#001080" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.EventAccess" Foreground="#001080" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.InactiveCode" Foreground="#767676" />
<themes:SyntaxColor x:Key="SyntaxColor.C#.SemanticError" Foreground="#cd3131" />
@ -92,4 +96,4 @@ @@ -92,4 +96,4 @@
<themes:SyntaxColor x:Key="SyntaxColor.XML.Entity" Foreground="#098658" />
<themes:SyntaxColor x:Key="SyntaxColor.XML.BrokenEntity" Foreground="#cd3131" />
</ResourceDictionary>
</ResourceDictionary>

6
ILSpy/Themes/ThemeManager.cs

@ -75,8 +75,12 @@ namespace ICSharpCode.ILSpy.Themes @@ -75,8 +75,12 @@ namespace ICSharpCode.ILSpy.Themes
return new Style(typeof(Button), (Style)Application.Current.FindResource(ToolBar.ButtonStyleKey));
}
public void UpdateColors(IHighlightingDefinition highlightingDefinition)
public void ApplyHighlightingColors(IHighlightingDefinition highlightingDefinition)
{
// Make sure all color values are taken from the theme
foreach (var color in highlightingDefinition.NamedHighlightingColors)
SyntaxColor.ResetColor(color);
var prefix = $"SyntaxColor.{highlightingDefinition.Name}.";
foreach (var (key, syntaxColor) in _syntaxColors)

Loading…
Cancel
Save