Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better dark theme colors #26

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions T4Language/Classifications.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.ComponentModel.Composition;
using System.Windows.Media;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;

Expand Down Expand Up @@ -35,10 +34,7 @@ static class Classifications
[UserVisible(true)]
class ArgumentFormat : ClassificationFormatDefinition
{
public ArgumentFormat()
{
ForegroundColor = Colors.Red;
}
public ArgumentFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -47,10 +43,7 @@ public ArgumentFormat()
[UserVisible(true)]
class ArgumentValueFormat : ClassificationFormatDefinition
{
public ArgumentValueFormat()
{
ForegroundColor = Colors.Blue;
}
public ArgumentValueFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -59,11 +52,7 @@ public ArgumentValueFormat()
[UserVisible(true)]
class DelimiterFormat : ClassificationFormatDefinition
{
public DelimiterFormat()
{
BackgroundColor = Colors.Yellow;
ForegroundColor = Colors.Black;
}
public DelimiterFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -72,10 +61,7 @@ public DelimiterFormat()
[UserVisible(true)]
class DirectiveFormat : ClassificationFormatDefinition
{
public DirectiveFormat()
{
ForegroundColor = Colors.Maroon;
}
public DirectiveFormat() { }
}

[Export(typeof(EditorFormatDefinition))]
Expand All @@ -84,9 +70,6 @@ public DirectiveFormat()
[UserVisible(true)]
class OperatorFormat : ClassificationFormatDefinition
{
public OperatorFormat()
{
ForegroundColor = Colors.Blue;
}
public OperatorFormat() { }
}
}
5 changes: 5 additions & 0 deletions T4Language/T4Colors.pkgdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[$RootKey$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}\Text Editor]
"Data"=hex:80,00,00,00,0b,00,00,00,01,00,00,00,85,56,a0,75,a8,00,ed,4d,ba,e5,e7,a5,0b,fa,92,9a,04,00,00,00,0c,00,00,00,54,34,20,44,69,72,65,63,74,69,76,65,00,01,c5,86,c0,ff,0c,00,00,00,54,34,20,44,65,6c,69,6d,69,74,65,72,01,8f,8f,1a,ff,01,00,00,00,ff,0b,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,00,01,9c,dc,fe,ff,11,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,20,56,61,6c,75,65,00,01,ce,91,78,ff

[$RootKey$\Themes\{de3dbbcd-f642-433c-8353-8f1df4370aba}\Text Editor]
"Data"=hex:80,00,00,00,0b,00,00,00,01,00,00,00,85,56,a0,75,a8,00,ed,4d,ba,e5,e7,a5,0b,fa,92,9a,04,00,00,00,0c,00,00,00,54,34,20,44,69,72,65,63,74,69,76,65,00,01,af,00,db,ff,0c,00,00,00,54,34,20,44,65,6c,69,6d,69,74,65,72,01,dd,dd,76,ff,01,00,00,00,ff,0b,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,00,01,e5,00,00,ff,11,00,00,00,54,34,20,41,72,67,75,6d,65,6e,74,20,56,61,6c,75,65,00,01,00,00,ff,ff
4 changes: 4 additions & 0 deletions T4Language/T4Language.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
<DependentUpon>assembly.tmSnippet.yml</DependentUpon>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="T4Colors.pkgdef">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<None Include="Snippets\assembly.tmSnippet.yml" />
<Content Include="Snippets\import.tmSnippet">
<DependentUpon>import.tmSnippet.yml</DependentUpon>
Expand Down
36 changes: 36 additions & 0 deletions T4Language/T4Theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Themes>
<Theme Name="Light" GUID="{de3dbbcd-f642-433c-8353-8f1df4370aba}">
<Category Name="Text Editor" GUID="{75a05685-00a8-4ded-bae5-e7a50bfa929a}">
<Color Name="T4 Directive">
<Foreground Type="CT_RAW" Source="FFAF00DB" />
</Color>
<Color Name="T4 Delimiter">
<Background Type="CT_RAW" Source="FFDDDD76" />
<Foreground Type="CT_RAW" Source="FF000000" />
</Color>
<Color Name="T4 Argument">
<Foreground Type="CT_RAW" Source="FFE50000" />
</Color>
<Color Name="T4 Argument Value">
<Foreground Type="CT_RAW" Source="FF0000FF" />
</Color>
</Category>
</Theme>
<Theme Name="Dark" GUID="{1ded0138-47ce-435e-84ef-9ec1f439b749}">
<Category Name="Text Editor" GUID="{75a05685-00a8-4ded-bae5-e7a50bfa929a}">
<Color Name="T4 Directive">
<Foreground Type="CT_RAW" Source="FFC586C0" />
</Color>
<Color Name="T4 Delimiter">
<Background Type="CT_RAW" Source="FF8F8F1A" />
<Foreground Type="CT_RAW" Source="FF000000" />
</Color>
<Color Name="T4 Argument">
<Foreground Type="CT_RAW" Source="FF9CDCFE" />
</Color>
<Color Name="T4 Argument Value">
<Foreground Type="CT_RAW" Source="FFCE9178" />
</Color>
</Category>
</Theme>
</Themes>
1 change: 1 addition & 0 deletions T4Language/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="Grammars.pkgdef" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="T4Colors.pkgdef" />
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
</Assets>
</PackageManifest>
Loading