From 93a6a9b244685ae9947a4c56a8017f0f5125ae15 Mon Sep 17 00:00:00 2001 From: natsurainko Date: Sat, 20 Jul 2024 17:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AEUI=E7=BB=86=E8=8A=82=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Natsurainko.FluentCore | 2 +- .../Views/Settings/DownloadPage.xaml | 31 +++++++++-------- .../Views/Settings/LaunchPage.xaml | 34 +++++++++++++++++-- .../Views/Settings/LaunchPage.xaml.cs | 9 +++-- .../Views/Settings/NavigationPage.xaml | 1 + 5 files changed, 54 insertions(+), 23 deletions(-) diff --git a/Natsurainko.FluentCore b/Natsurainko.FluentCore index 0a54922c..221a8bd1 160000 --- a/Natsurainko.FluentCore +++ b/Natsurainko.FluentCore @@ -1 +1 @@ -Subproject commit 0a54922c24d63380600933f6232d672e4e95fe9f +Subproject commit 221a8bd1f3ef8a0f1ae57f1137fef47590849b0f diff --git a/Natsurainko.FluentLauncher/Views/Settings/DownloadPage.xaml b/Natsurainko.FluentLauncher/Views/Settings/DownloadPage.xaml index c083d816..0cec780c 100644 --- a/Natsurainko.FluentLauncher/Views/Settings/DownloadPage.xaml +++ b/Natsurainko.FluentLauncher/Views/Settings/DownloadPage.xaml @@ -44,21 +44,22 @@ Description="Please optimize and adjust according to the actual network environment" Header="Maximum number of download threads" HeaderIcon="{xh:FontIcon Glyph=}"> - - - - - - - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + diff --git a/Natsurainko.FluentLauncher/Views/Settings/LaunchPage.xaml.cs b/Natsurainko.FluentLauncher/Views/Settings/LaunchPage.xaml.cs index 25004649..1f2aac50 100644 --- a/Natsurainko.FluentLauncher/Views/Settings/LaunchPage.xaml.cs +++ b/Natsurainko.FluentLauncher/Views/Settings/LaunchPage.xaml.cs @@ -3,7 +3,6 @@ using FluentLauncher.Infra.UI.Navigation; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Media; using Natsurainko.FluentLauncher.Services.Settings; using Natsurainko.FluentLauncher.Services.UI.Messaging; @@ -36,12 +35,12 @@ private void Card_Loaded(object sender, RoutedEventArgs e) if (m.PropertyName != tag) return; - card.Background = path == m.Value ? (Brush)this.Resources["AccentButtonBackground"] : defaultBackground; - card.RequestedTheme = path == m.Value ? ElementTheme.Light : defaultTheme; + var enableText = card.FindName("EnableText") as Border; + enableText!.Visibility = path == m.Value ? Visibility.Visible : Visibility.Collapsed; }); - card.Background = path == current ? (Brush)this.Resources["AccentButtonBackground"] : defaultBackground; - card.RequestedTheme = path == current ? ElementTheme.Light : defaultTheme; + var enableText = card.FindName("EnableText") as Border; + enableText!.Visibility = path == current ? Visibility.Visible : Visibility.Collapsed; card.Unloaded += (s, e) => WeakReferenceMessenger.Default.Unregister(sender); } diff --git a/Natsurainko.FluentLauncher/Views/Settings/NavigationPage.xaml b/Natsurainko.FluentLauncher/Views/Settings/NavigationPage.xaml index 1eb4218e..a1641bac 100644 --- a/Natsurainko.FluentLauncher/Views/Settings/NavigationPage.xaml +++ b/Natsurainko.FluentLauncher/Views/Settings/NavigationPage.xaml @@ -19,6 +19,7 @@