1.1.3 -> 1.1.4 第15次更新

This commit is contained in:
Space Time 2024-11-25 18:09:36 +08:00
parent 144de24013
commit 94581ee703
4 changed files with 23 additions and 4 deletions

3
Preses/AboutPres.cs Normal file
View File

@ -0,0 +1,3 @@
namespace Sheas_Cealer.Preses;
internal partial class AboutPres : GlobalPres;

View File

@ -12,7 +12,7 @@ internal partial class GlobalPres : ObservableRecipient, IRecipient<PropertyChan
internal GlobalPres() => IsActive = true; internal GlobalPres() => IsActive = true;
[ObservableProperty, NotifyPropertyChangedRecipients] [ObservableProperty, NotifyPropertyChangedRecipients]
private bool? isLightTheme = null; private static bool? isLightTheme = null;
partial void OnIsLightThemeChanged(bool? value) partial void OnIsLightThemeChanged(bool? value)
{ {
PaletteHelper paletteHelper = new(); PaletteHelper paletteHelper = new();

View File

@ -4,14 +4,26 @@ using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using Sheas_Cealer.Consts; using Sheas_Cealer.Consts;
using Sheas_Cealer.Preses;
using Sheas_Cealer.Utils; using Sheas_Cealer.Utils;
namespace Sheas_Cealer.Wins; namespace Sheas_Cealer.Wins;
public partial class AboutWin : Window public partial class AboutWin : Window
{ {
internal AboutWin() => InitializeComponent(); private static AboutPres? AboutPres;
protected override void OnSourceInitialized(EventArgs e) => IconRemover.RemoveIcon(this);
internal AboutWin()
{
InitializeComponent();
AboutPres = new();
}
protected override void OnSourceInitialized(EventArgs e)
{
IconRemover.RemoveIcon(this);
BorderThemeSetter.SetBorderTheme(this, AboutPres!.IsLightTheme);
}
private void AboutButton_Click(object sender, RoutedEventArgs e) private void AboutButton_Click(object sender, RoutedEventArgs e)
{ {

View File

@ -54,7 +54,11 @@ public partial class MainWin : Window
DataContext = MainPres = new(args); DataContext = MainPres = new(args);
} }
protected override void OnSourceInitialized(EventArgs e) => IconRemover.RemoveIcon(this); protected override void OnSourceInitialized(EventArgs e)
{
IconRemover.RemoveIcon(this);
BorderThemeSetter.SetBorderTheme(this, MainPres!.IsLightTheme);
}
private async void MainWin_Loaded(object sender, RoutedEventArgs e) private async void MainWin_Loaded(object sender, RoutedEventArgs e)
{ {
SettingsBox.Focus(); SettingsBox.Focus();