Skip to content

Commit

Permalink
Themes migrated to MaterialDesign3
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed May 5, 2024
1 parent 082183e commit 80fe400
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 117 deletions.
8 changes: 4 additions & 4 deletions clashN/clashN/App.xaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Application
x:Class="ClashN.App"
xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:materialDesign="http:https://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:ClashN.Converters"
xmlns:materialDesign="http:https://materialdesigninxaml.net/winfx/xaml/themes"
ShutdownMode="OnExplicitShutdown"
StartupUri="Views/MainWindow.xaml">
<Application.Resources>
Expand All @@ -13,7 +13,7 @@
BaseTheme="Dark"
PrimaryColor="Blue"
SecondaryColor="Lime" />
<ResourceDictionary Source="pack:https://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack:https://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>
<system:Double x:Key="StdFontSize1">11</system:Double>
<system:Double x:Key="StdFontSize2">12</system:Double>
Expand Down Expand Up @@ -74,7 +74,7 @@
</materialDesign:Card>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="_Card" Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter TargetName="_Card" Property="Background" Value="{DynamicResource MaterialDesign.Brush.Primary.Light}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand All @@ -95,7 +95,7 @@
BasedOn="{StaticResource MaterialDesignRaisedButton}"
TargetType="{x:Type ButtonBase}">
<Setter Property="FontSize" Value="{DynamicResource StdFontSize3}" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueDarkForegroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}" />
</Style>
<Style
x:Key="DefMenu"
Expand Down
2 changes: 1 addition & 1 deletion clashN/clashN/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ public void ModifyTheme(bool isDarkTheme)
{
var theme = _paletteHelper.GetTheme();

theme.SetBaseTheme(isDarkTheme ? Theme.Dark : Theme.Light);
theme.SetBaseTheme(isDarkTheme ? BaseTheme.Dark : BaseTheme.Light);
_paletteHelper.SetTheme(theme);

Utils.SetDarkBorder(Application.Current.MainWindow, isDarkTheme);
Expand Down
210 changes: 105 additions & 105 deletions clashN/clashN/Views/MainWindow.xaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clashN/clashN/Views/MsgView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<DockPanel Margin="2">
<TextBlock
DockPanel.Dock="Top"
Foreground="{DynamicResource PrimaryHueLightBrush}"
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Light}"
Style="{StaticResource ListItemTitle}"
Text="{x:Static resx:ResUI.TbMsgTitle}" />
<TextBox
Expand Down
2 changes: 1 addition & 1 deletion clashN/clashN/Views/ProfilesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
Width="5"
Height="auto"
Margin="0,1"
Background="{DynamicResource PrimaryHueLightBrush}"
Background="{DynamicResource MaterialDesign.Brush.Primary.Light}"
CornerRadius="4"
DockPanel.Dock="Left"
Visibility="{Binding Path=IsActive, Converter={StaticResource BoolToVisConverter}}" />
Expand Down
2 changes: 1 addition & 1 deletion clashN/clashN/Views/ProxiesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
Width="5"
Height="auto"
Margin="0,1"
Background="{DynamicResource PrimaryHueLightBrush}"
Background="{DynamicResource MaterialDesign.Brush.Primary.Light}"
CornerRadius="4"
DockPanel.Dock="Left"
Visibility="{Binding Path=isActive, Converter={StaticResource BoolToVisConverter}}" />
Expand Down
8 changes: 4 additions & 4 deletions clashN/clashN/clashN.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@


<ItemGroup>
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
<PackageReference Include="MaterialDesignThemes" Version="5.0.0" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NHotkey" Version="3.0.0" />
<PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
<PackageReference Include="QRCoder.Xaml" Version="1.5.1" />
<PackageReference Include="TaskScheduler" Version="2.10.1" />
<PackageReference Include="TaskScheduler" Version="2.11.0" />
<PackageReference Include="YamlDotNet" Version="15.1.2" />
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
<PackageReference Include="ReactiveUI.WPF" Version="19.6.12" />
<PackageReference Include="Splat.NLog" Version="14.8.12" />
<PackageReference Include="ReactiveUI.WPF" Version="20.0.1" />
<PackageReference Include="Splat.NLog" Version="15.0.1" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
</ItemGroup>

Expand Down

0 comments on commit 80fe400

Please sign in to comment.