From 2b54b03f98ba50305726969771f5ae29322907f4 Mon Sep 17 00:00:00 2001 From: natsurainko Date: Tue, 19 Nov 2024 16:47:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BE=A7=E6=A0=8F=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E7=8A=B6=E6=80=81=E4=BF=9D=E5=AD=98=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=81=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86=20nuget=20?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Natsurainko.FluentCore | 2 +- .../Natsurainko.FluentLauncher.csproj | 4 ++-- Natsurainko.FluentLauncher/Views/Home/HomePage.xaml.cs | 10 ++++++++++ Natsurainko.FluentLauncher/Views/ShellPage.xaml.cs | 4 ++-- ...uentLauncher.Infra.Settings.SourceGenerators.csproj | 1 + .../FluentLauncher.Infra.Settings.csproj | 4 ++++ .../FluentLauncher.Infra.UI.csproj | 1 + .../FluentLauncher.Infra.WinUI.csproj | 2 +- 8 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Natsurainko.FluentCore b/Natsurainko.FluentCore index ff541fcd..230013ce 160000 --- a/Natsurainko.FluentCore +++ b/Natsurainko.FluentCore @@ -1 +1 @@ -Subproject commit ff541fcd30e4aab10e9e5dada3e9b40d81c4a05e +Subproject commit 230013cec85928179967c07bab813ec6183786dc diff --git a/Natsurainko.FluentLauncher/Natsurainko.FluentLauncher.csproj b/Natsurainko.FluentLauncher/Natsurainko.FluentLauncher.csproj index 03d9af51..daa16505 100644 --- a/Natsurainko.FluentLauncher/Natsurainko.FluentLauncher.csproj +++ b/Natsurainko.FluentLauncher/Natsurainko.FluentLauncher.csproj @@ -57,7 +57,7 @@ - + @@ -78,7 +78,7 @@ - + diff --git a/Natsurainko.FluentLauncher/Views/Home/HomePage.xaml.cs b/Natsurainko.FluentLauncher/Views/Home/HomePage.xaml.cs index 6c2c9358..0089df2d 100644 --- a/Natsurainko.FluentLauncher/Views/Home/HomePage.xaml.cs +++ b/Natsurainko.FluentLauncher/Views/Home/HomePage.xaml.cs @@ -28,6 +28,10 @@ private void Page_Loaded(object sender, RoutedEventArgs e) ? new SolidColorBrush(Color.FromArgb(128, 255, 255, 255)) : new SolidColorBrush(Color.FromArgb(76, 58, 58, 58)); + Brush foregroundBrush = this.ActualTheme == ElementTheme.Light + ? new SolidColorBrush(Color.FromArgb(255, 26, 26, 26)) + : new SolidColorBrush(Color.FromArgb(255, 255, 255, 255)); + DropDownButton.Shadow = _themeShadow; DropDownButton.Translation += new System.Numerics.Vector3(0, 0, 32); DropDownButtonArea.Background = new CommunityToolkit.WinUI.Media.BackdropBlurBrush() { Amount = 16 }; @@ -37,6 +41,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) HyperlinkButton.Translation += new System.Numerics.Vector3(0, 0, 32); HyperlinkButtonArea.Background = new CommunityToolkit.WinUI.Media.BackdropBlurBrush() { Amount = 16 }; HyperlinkButton.Background = maskColorBrush; + HyperlinkButton.Foreground = foregroundBrush; this.ActualThemeChanged += (_, e) => { @@ -44,8 +49,13 @@ private void Page_Loaded(object sender, RoutedEventArgs e) ? new SolidColorBrush(Color.FromArgb(128, 255, 255, 255)) : new SolidColorBrush(Color.FromArgb(76, 58, 58, 58)); + Brush foregroundBrush = this.ActualTheme == ElementTheme.Light + ? new SolidColorBrush(Color.FromArgb(255, 26, 26, 26)) + : new SolidColorBrush(Color.FromArgb(255, 255, 255, 255)); + DropDownButton.Background = maskColorBrush; HyperlinkButton.Background = maskColorBrush; + HyperlinkButton.Foreground = foregroundBrush; }; } diff --git a/Natsurainko.FluentLauncher/Views/ShellPage.xaml.cs b/Natsurainko.FluentLauncher/Views/ShellPage.xaml.cs index 6dd3fdd6..8faeb95f 100644 --- a/Natsurainko.FluentLauncher/Views/ShellPage.xaml.cs +++ b/Natsurainko.FluentLauncher/Views/ShellPage.xaml.cs @@ -214,13 +214,13 @@ private async void BackgroundReloaded(object? sender, EventArgs e) void ConfigurePage() { ContentFrame = contentFrame; + NavigationViewControl.IsPaneOpen = _settings.NavigationViewIsPaneOpen; + App.GetService().BackgroundReloaded += BackgroundReloaded; } void ConfigureNavigationView() { - NavigationViewControl.IsPaneOpen = _settings.NavigationViewIsPaneOpen; - if (_settings.UseBackgroundMask) { var RootSplitView = FindControl(NavigationViewControl, typeof(SplitView), "RootSplitView"); diff --git a/infra/FluentLauncher.Infra.Settings.SourceGenerators/FluentLauncher.Infra.Settings.SourceGenerators.csproj b/infra/FluentLauncher.Infra.Settings.SourceGenerators/FluentLauncher.Infra.Settings.SourceGenerators.csproj index 8f6652c9..343449a3 100644 --- a/infra/FluentLauncher.Infra.Settings.SourceGenerators/FluentLauncher.Infra.Settings.SourceGenerators.csproj +++ b/infra/FluentLauncher.Infra.Settings.SourceGenerators/FluentLauncher.Infra.Settings.SourceGenerators.csproj @@ -19,6 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/infra/FluentLauncher.Infra.Settings/FluentLauncher.Infra.Settings.csproj b/infra/FluentLauncher.Infra.Settings/FluentLauncher.Infra.Settings.csproj index d86a0c34..7a7cb4c9 100644 --- a/infra/FluentLauncher.Infra.Settings/FluentLauncher.Infra.Settings.csproj +++ b/infra/FluentLauncher.Infra.Settings/FluentLauncher.Infra.Settings.csproj @@ -6,4 +6,8 @@ true + + + + diff --git a/infra/FluentLauncher.Infra.UI/FluentLauncher.Infra.UI.csproj b/infra/FluentLauncher.Infra.UI/FluentLauncher.Infra.UI.csproj index 691fdeff..3cfd3135 100644 --- a/infra/FluentLauncher.Infra.UI/FluentLauncher.Infra.UI.csproj +++ b/infra/FluentLauncher.Infra.UI/FluentLauncher.Infra.UI.csproj @@ -8,6 +8,7 @@ + diff --git a/infra/FluentLauncher.Infra.WinUI/FluentLauncher.Infra.WinUI.csproj b/infra/FluentLauncher.Infra.WinUI/FluentLauncher.Infra.WinUI.csproj index 1d16db1f..14b08c2c 100644 --- a/infra/FluentLauncher.Infra.WinUI/FluentLauncher.Infra.WinUI.csproj +++ b/infra/FluentLauncher.Infra.WinUI/FluentLauncher.Infra.WinUI.csproj @@ -15,7 +15,7 @@ - +