Skip to content

Commit

Permalink
Themes migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed May 5, 2024
1 parent b6c5b46 commit 60068d8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions v2rayN/v2rayN/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
BaseTheme="Light"
PrimaryColor="Blue"
SecondaryColor="Lime" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign2.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>
<system:Double x:Key="MenuItemHeight">26</system:Double>
<system:Double x:Key="StdFontSize">12</system:Double>
Expand Down Expand Up @@ -72,10 +72,10 @@
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.Primary.Light}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
<Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.Primary}" />
</Trigger>
</Style.Triggers>
</Style>
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,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
4 changes: 2 additions & 2 deletions v2rayN/v2rayN/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@
<Style BasedOn="{StaticResource MaterialDesignDataGridCell}" TargetType="DataGridCell">
<Style.Triggers>
<DataTrigger Binding="{Binding isActive}" Value="True">
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.Primary.Light}" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesign.Brush.Primary.Light}" />
</DataTrigger>
</Style.Triggers>
</Style>
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/Views/MsgView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<TextBlock
Margin="8,0"
VerticalAlignment="Center"
Foreground="{DynamicResource PrimaryHueLightBrush}"
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Light}"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.MsgInformationTitle}" />
<ComboBox
Expand Down
4 changes: 2 additions & 2 deletions v2rayN/v2rayN/Views/RoutingSettingWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@
<Style BasedOn="{StaticResource MaterialDesignDataGridCell}" TargetType="DataGridCell">
<Style.Triggers>
<DataTrigger Binding="{Binding isActive}" Value="True">
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.Primary.Light}" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesign.Brush.Primary.Light}" />
</DataTrigger>
</Style.Triggers>
</Style>
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/v2rayN.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="Downloader" Version="3.0.6" />
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
<PackageReference Include="MaterialDesignThemes" Version="5.0.0" />
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.131" />
<PackageReference Include="QRCoder.Xaml" Version="1.5.1" />
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
Expand Down

0 comments on commit 60068d8

Please sign in to comment.