diff --git a/README.md b/README.md index 698da761..f7ccdefe 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,7 @@ Install with Snap Hutao MSIX package, can be installed with Windows built-in App ### 特定的原神项目 / Specific Genshin-related Projects -* [biuuu/genshin-wish-export](https://github.com/biuuu/genshin-wish-export) -* [xunkong/xunkong](https://github.com/xunkong/xunkong) -* [YuehaiTeam/cocogoat](https://github.com/YuehaiTeam/cocogoat) +* [Scighost/Starward](https://github.com/Scighost/Starward) ### 使用的技术栈 / Tech Stack @@ -57,7 +55,6 @@ Install with Snap Hutao MSIX package, can be installed with Windows built-in App * [dotnet/efcore](https://github.com/dotnet/efcore) * [dotnet/runtime](https://github.com/dotnet/runtime) * [DotNetAnalyzers/StyleCopAnalyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) -* [microsoft/CsWin32](https://github.com/microsoft/CsWin32) * [microsoft/vs-validation](https://github.com/microsoft/vs-validation) * [microsoft/WindowsAppSDK](https://github.com/microsoft/WindowsAppSDK) * [microsoft/microsoft-ui-xaml](https://github.com/microsoft/microsoft-ui-xaml) diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Helper/NavigationViewHelper.cs b/src/Snap.Hutao/Snap.Hutao/Control/Helper/NavigationViewHelper.cs new file mode 100644 index 00000000..38a54492 --- /dev/null +++ b/src/Snap.Hutao/Snap.Hutao/Control/Helper/NavigationViewHelper.cs @@ -0,0 +1,39 @@ +// Copyright (c) DGP Studio. All rights reserved. +// Licensed under the MIT license. + +using CommunityToolkit.WinUI; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; + +namespace Snap.Hutao.Control.Helper; + +[SuppressMessage("", "SH001")] +[DependencyProperty("PaneCornerRadius", typeof(CornerRadius), default, nameof(OnPaneCornerRadiusChanged), IsAttached = true, AttachedType = typeof(NavigationView))] +public sealed partial class NavigationViewHelper +{ + private static void OnPaneCornerRadiusChanged(DependencyObject dp, DependencyPropertyChangedEventArgs args) + { + NavigationView navigationView = (NavigationView)dp; + CornerRadius newValue = (CornerRadius)args.NewValue; + + if (navigationView.IsLoaded) + { + SetNavigationViewPaneCornerRadius(navigationView, newValue); + return; + } + + navigationView.Loaded += (s, e) => + { + NavigationView loadedNavigationView = (NavigationView)s; + SetNavigationViewPaneCornerRadius(loadedNavigationView, newValue); + }; + } + + private static void SetNavigationViewPaneCornerRadius(NavigationView navigationView, CornerRadius value) + { + if (navigationView.FindDescendant("RootSplitView") is SplitView splitView) + { + splitView.CornerRadius = value; + } + } +} diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Helper/SettingsExpanderHelper.cs b/src/Snap.Hutao/Snap.Hutao/Control/Helper/SettingsExpanderHelper.cs index 3d3b9540..f68c70ce 100644 --- a/src/Snap.Hutao/Snap.Hutao/Control/Helper/SettingsExpanderHelper.cs +++ b/src/Snap.Hutao/Snap.Hutao/Control/Helper/SettingsExpanderHelper.cs @@ -20,4 +20,4 @@ public sealed partial class SettingsExpanderHelper } } } -} +} \ No newline at end of file diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Theme/Card.xaml b/src/Snap.Hutao/Snap.Hutao/Control/Theme/Card.xaml index 381d9610..2467859a 100644 --- a/src/Snap.Hutao/Snap.Hutao/Control/Theme/Card.xaml +++ b/src/Snap.Hutao/Snap.Hutao/Control/Theme/Card.xaml @@ -24,10 +24,33 @@ + + + + + + + diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Theme/InfoBarOverride.xaml b/src/Snap.Hutao/Snap.Hutao/Control/Theme/InfoBarOverride.xaml index 6873f003..e09f672d 100644 --- a/src/Snap.Hutao/Snap.Hutao/Control/Theme/InfoBarOverride.xaml +++ b/src/Snap.Hutao/Snap.Hutao/Control/Theme/InfoBarOverride.xaml @@ -2,6 +2,53 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:shch="using:Snap.Hutao.Control.Helper"> + + + + + + + + + + + + + + + 19,16,19,16 0,0,0,0 20 diff --git a/src/Snap.Hutao/Snap.Hutao/MainWindow.xaml b/src/Snap.Hutao/Snap.Hutao/MainWindow.xaml index 872ad4f9..72c42ad0 100644 --- a/src/Snap.Hutao/Snap.Hutao/MainWindow.xaml +++ b/src/Snap.Hutao/Snap.Hutao/MainWindow.xaml @@ -2,18 +2,18 @@ x:Class="Snap.Hutao.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:cwuc="using:CommunityToolkit.WinUI.UI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:shv="using:Snap.Hutao.View" mc:Ignorable="d"> + + + Margin="44,0,0,0"/> - diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/TestBackground.jpg b/src/Snap.Hutao/Snap.Hutao/Resource/TestBackground.jpg new file mode 100644 index 00000000..e1fa9164 Binary files /dev/null and b/src/Snap.Hutao/Snap.Hutao/Resource/TestBackground.jpg differ diff --git a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj index b3ccd68a..35eff84b 100644 --- a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj +++ b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj @@ -135,6 +135,7 @@ + @@ -277,6 +278,7 @@ + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Card/AchievementCard.xaml b/src/Snap.Hutao/Snap.Hutao/View/Card/AchievementCard.xaml index f868740d..00b0e477 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Card/AchievementCard.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Card/AchievementCard.xaml @@ -14,6 +14,7 @@ VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" d:DataContext="{d:DesignInstance shva:AchievementViewModelSlim}" + Background="Transparent" Command="{Binding NavigateCommand}" Style="{ThemeResource DefaultButtonStyle}" mc:Ignorable="d"> diff --git a/src/Snap.Hutao/Snap.Hutao/View/Card/DailyNoteCard.xaml b/src/Snap.Hutao/Snap.Hutao/View/Card/DailyNoteCard.xaml index f33bd6e7..a0ff4909 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Card/DailyNoteCard.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Card/DailyNoteCard.xaml @@ -16,6 +16,7 @@ VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" d:DataContext="{d:DesignInstance shvd:DailyNoteViewModelSlim}" + Background="Transparent" Command="{Binding NavigateCommand}" Style="{ThemeResource DefaultButtonStyle}" mc:Ignorable="d"> diff --git a/src/Snap.Hutao/Snap.Hutao/View/Card/GachaStatisticsCard.xaml b/src/Snap.Hutao/Snap.Hutao/View/Card/GachaStatisticsCard.xaml index be224ffb..63629638 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Card/GachaStatisticsCard.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Card/GachaStatisticsCard.xaml @@ -15,6 +15,7 @@ VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" d:DataContext="{d:DesignInstance shvg:GachaLogViewModelSlim}" + Background="Transparent" Command="{Binding NavigateCommand}" Style="{ThemeResource DefaultButtonStyle}" mc:Ignorable="d"> diff --git a/src/Snap.Hutao/Snap.Hutao/View/Card/LaunchGameCard.xaml b/src/Snap.Hutao/Snap.Hutao/View/Card/LaunchGameCard.xaml index b48381ec..b0581d20 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Card/LaunchGameCard.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Card/LaunchGameCard.xaml @@ -14,6 +14,7 @@ VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" d:DataContext="{d:DesignInstance shvg:LaunchGameViewModelSlim}" + Background="Transparent" Command="{Binding LaunchCommand}" Style="{ThemeResource DefaultButtonStyle}" mc:Ignorable="d"> diff --git a/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml b/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml index 1c27381e..dee8ba3a 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml @@ -4,6 +4,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:shch="using:Snap.Hutao.Control.Helper" xmlns:shcm="using:Snap.Hutao.Control.Markup" xmlns:shv="using:Snap.Hutao.View" xmlns:shvh="using:Snap.Hutao.View.Helper" @@ -12,16 +13,34 @@ 0,44,0,0 24 + + + 0 + + + + + + + 0 + 0 + + - + @@ -187,10 +187,14 @@ - + + + + + @@ -205,7 +209,7 @@ Text="{Binding GreetingText}"/> diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml index 36fe06e1..05d6783a 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/FeedbackPage.xaml @@ -21,6 +21,15 @@ + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml index e7426348..f957e7da 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml @@ -356,39 +356,44 @@ - - - - - - - - - - - - + Style="{ThemeResource AcrylicBorderCardStyle}"> + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml index 53b5078c..b416e355 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/WikiAvatarPage.xaml @@ -322,7 +322,7 @@ Spacing="16"> - + diff --git a/src/Snap.Hutao/Temp.txt b/src/Snap.Hutao/Temp.txt deleted file mode 100644 index 5f282702..00000000 --- a/src/Snap.Hutao/Temp.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file