Skip to content

Commit

Permalink
修复侧栏展开状态保存问题、更新部分 nuget 包
Browse files Browse the repository at this point in the history
  • Loading branch information
natsurainko committed Nov 19, 2024
1 parent 0802992 commit 2b54b03
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Natsurainko.FluentCore
4 changes: 2 additions & 2 deletions Natsurainko.FluentLauncher/Natsurainko.FluentLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<ItemGroup>
<!-- NuGet Packages -->
<PackageReference Include="ColorCode.WinUI" Version="2.0.15" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.WinUI.Animations" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.ColorPicker" Version="8.1.240821" />
Expand All @@ -78,7 +78,7 @@
<PackageReference Include="ReverseMarkdown" Version="4.6.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="WindowsAPICodePack.Shell.CommonFileDialogs" Version="1.1.5" />
<PackageReference Include="WinUIEx" Version="2.3.4" />
Expand Down
10 changes: 10 additions & 0 deletions Natsurainko.FluentLauncher/Views/Home/HomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand All @@ -37,15 +41,21 @@ 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) =>
{
Brush maskColorBrush = this.ActualTheme == ElementTheme.Light
? 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;
};
}

Expand Down
4 changes: 2 additions & 2 deletions Natsurainko.FluentLauncher/Views/ShellPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ private async void BackgroundReloaded(object? sender, EventArgs e)
void ConfigurePage()
{
ContentFrame = contentFrame;
NavigationViewControl.IsPaneOpen = _settings.NavigationViewIsPaneOpen;

App.GetService<AppearanceService>().BackgroundReloaded += BackgroundReloaded;
}

void ConfigureNavigationView()
{
NavigationViewControl.IsPaneOpen = _settings.NavigationViewIsPaneOpen;

if (_settings.UseBackgroundMask)
{
var RootSplitView = FindControl<SplitView>(NavigationViewControl, typeof(SplitView), "RootSplitView");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="WinUIEx" Version="2.3.4" />
</ItemGroup>

Expand Down

0 comments on commit 2b54b03

Please sign in to comment.