Browse Source

- Fine tune styles

- Do not override default windows style, interferes with AvalonDock.
pull/2334/head
tom-englert 4 years ago
parent
commit
78fa9529ad
  1. 2
      ILSpy/App.xaml.cs
  2. 6
      ILSpy/ILSpy.csproj
  3. 1
      ILSpy/MainWindow.xaml
  4. 2
      ILSpy/Search/SearchPane.xaml
  5. 7
      ILSpy/ThemeManager.cs
  6. 28
      ILSpy/themes/LightTheme.xaml
  7. 2
      SharpTreeView/ICSharpCode.TreeView.csproj

2
ILSpy/App.xaml.cs

@ -69,7 +69,7 @@ namespace ICSharpCode.ILSpy @@ -69,7 +69,7 @@ namespace ICSharpCode.ILSpy
}
InitializeComponent();
Resources.RegisterDefault();
Resources.RegisterDefaultStyles();
if (!System.Diagnostics.Debugger.IsAttached)
{

6
ILSpy/ILSpy.csproj

@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
<PackageReference Include="OSVersionHelper" Version="1.1.24" />
<PackageReference Include="DataGridExtensions" Version="2.5.1" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.31" />
<PackageReference Include="TomsToolbox.Wpf.Styles" Version="2.4.0" />
<PackageReference Include="TomsToolbox.Wpf.Styles" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
@ -520,6 +520,7 @@ @@ -520,6 +520,7 @@
<Page Include="Metadata\FlagsFilterControl.xaml" />
<Page Include="Metadata\FlagsTooltip.xaml" />
<Page Include="Metadata\HexFilterControl.xaml" />
<Page Include="themes\LightTheme.xaml" />
<Page Include="Views\CreateListDialog.xaml" />
<Page Include="Views\DebugSteps.xaml" />
<Page Include="Images\Assembly.xaml" />
@ -837,6 +838,9 @@ @@ -837,6 +838,9 @@
<Page Update="Options\DecompilerSettingsPanel.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="themes\LightTheme.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>

1
ILSpy/MainWindow.xaml

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
MinHeight="200"
UseLayoutRounding="True"
TextOptions.TextFormattingMode="Display"
Style="{StaticResource {x:Static styles:ResourceKeys.WindowStyle}}"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d:DesignHeight="500" d:DesignWidth="500"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
xmlns:styles="urn:TomsToolbox.Wpf.Styles"

2
ILSpy/Search/SearchPane.xaml

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
<RowDefinition />
</Grid.RowDefinitions>
<Border BorderBrush="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="0">
<Grid Height="23">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />

7
ILSpy/ThemeManager.cs

@ -23,10 +23,9 @@ namespace ICSharpCode.ILSpy @@ -23,10 +23,9 @@ namespace ICSharpCode.ILSpy
_themeDictionaryContainer.MergedDictionaries.Clear();
if (value)
{
_themeDictionaryContainer.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("themes/DarkTheme.xaml", UriKind.Relative) });
}
string theme = value ? "Dark" : "Light";
_themeDictionaryContainer.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri($"themes/{theme}Theme.xaml", UriKind.Relative) });
}
}
}

28
ILSpy/themes/LightTheme.xaml

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
<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">
<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.InfoTextBrushKey}" Color="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static SystemColors.InfoBrushKey}" Color="#F5F5F5" />
<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="#007ACC" />
<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="#1E1E1E" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.BorderBrush}" Color="#CCCEDB" />
<SolidColorBrush x:Key="{x:Static styles:ResourceKeys.DisabledBrush}" Color="#EEEEF2" />
</ResourceDictionary>

2
SharpTreeView/ICSharpCode.TreeView.csproj

@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="TomsToolbox.Wpf.Styles" Version="2.4.0" />
<PackageReference Include="TomsToolbox.Wpf.Styles" Version="2.4.2" />
</ItemGroup>
</Project>

Loading…
Cancel
Save