From 2e589a410b74d6ac98e60dfc1301bad708346652 Mon Sep 17 00:00:00 2001 From: Scighost Date: Fri, 15 Nov 2024 23:19:02 +0800 Subject: [PATCH] update community toolkit to version 8 --- src/Starward/App.xaml | 2 - src/Starward/Controls/CachedImage.cs | 8 +- src/Starward/Controls/GachaStatsCard.xaml | 2 - src/Starward/Controls/GameBannerAndPost.xaml | 1 - src/Starward/Controls/ZZZGachaStatsCard.xaml | 2 - src/Starward/Pages/DownloadGamePage.xaml | 2 +- src/Starward/Pages/GachaLogPage.xaml | 2 - .../HoyolabToolbox/ApocalypticShadowPage.xaml | 2 - .../HoyolabToolbox/ForgottenHallPage.xaml | 2 - .../HoyolabToolbox/HoyolabToolboxPage.xaml | 3 - .../ImaginariumTheaterPage.xaml | 3 +- .../InterKnotMonthlyReportPage.xaml | 2 +- .../Pages/HoyolabToolbox/PureFictionPage.xaml | 2 - .../HoyolabToolbox/SimulatedUniversePage.xaml | 7 +- .../Pages/HoyolabToolbox/SpiralAbyssPage.xaml | 12 +-- .../TrailblazeCalendarPage.xaml | 2 +- .../HoyolabToolbox/TravelersDiaryPage.xaml | 2 +- src/Starward/Pages/ImageViewPage.xaml | 2 - src/Starward/Pages/ImageViewPage.xaml.cs | 2 +- src/Starward/Pages/LauncherPage.xaml | 1 - src/Starward/Pages/ScreenshotPage.xaml | 30 +++---- .../Pages/Setting/AboutSettingPage.xaml | 2 +- .../Pages/Welcome/SelectDirectoryPage.xaml | 2 +- src/Starward/Starward.csproj | 7 +- src/Starward/Themes/CachedImageStyle.xaml | 79 ------------------- 25 files changed, 33 insertions(+), 148 deletions(-) delete mode 100644 src/Starward/Themes/CachedImageStyle.xaml diff --git a/src/Starward/App.xaml b/src/Starward/App.xaml index 85bfa39ac..b14f6d5d8 100644 --- a/src/Starward/App.xaml +++ b/src/Starward/App.xaml @@ -11,8 +11,6 @@ - - diff --git a/src/Starward/Controls/CachedImage.cs b/src/Starward/Controls/CachedImage.cs index d0400ba19..5f2424e64 100644 --- a/src/Starward/Controls/CachedImage.cs +++ b/src/Starward/Controls/CachedImage.cs @@ -1,7 +1,7 @@ -using CommunityToolkit.WinUI.UI.Controls; -using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Media.Imaging; +using Scighost.WinUI.ImageEx; using Starward.Services.Cache; using System; using System.Collections.Concurrent; @@ -14,7 +14,7 @@ namespace Starward.Controls; -public sealed class CachedImage : ImageEx +public sealed partial class CachedImage : ImageEx { @@ -40,7 +40,7 @@ public bool IsThumbnail - protected override async Task ProvideCachedResourceAsync(Uri imageUri, CancellationToken token) + protected override async Task ProvideCachedResourceAsync(Uri imageUri, CancellationToken token) { try { diff --git a/src/Starward/Controls/GachaStatsCard.xaml b/src/Starward/Controls/GachaStatsCard.xaml index 3112bf250..2dfb34034 100644 --- a/src/Starward/Controls/GachaStatsCard.xaml +++ b/src/Starward/Controls/GachaStatsCard.xaml @@ -185,7 +185,6 @@ Background="{x:Bind Converter={StaticResource GachaPityProgressBackgroundBrushConverter}}" /> diff --git a/src/Starward/Pages/GachaLogPage.xaml b/src/Starward/Pages/GachaLogPage.xaml index 9ef24663c..500306f6a 100644 --- a/src/Starward/Pages/GachaLogPage.xaml +++ b/src/Starward/Pages/GachaLogPage.xaml @@ -299,7 +299,6 @@ @@ -76,7 +74,6 @@ sh:PointerCursor.CursorShape="Hand" Background="Transparent" CornerRadius="100" - IsCacheEnabled="True" Source="{x:Bind AvatarUrl}" /> diff --git a/src/Starward/Pages/HoyolabToolbox/ImaginariumTheaterPage.xaml b/src/Starward/Pages/HoyolabToolbox/ImaginariumTheaterPage.xaml index 9ae4039f9..f85fb7eec 100644 --- a/src/Starward/Pages/HoyolabToolbox/ImaginariumTheaterPage.xaml +++ b/src/Starward/Pages/HoyolabToolbox/ImaginariumTheaterPage.xaml @@ -431,10 +431,9 @@ - + @@ -359,7 +356,6 @@ diff --git a/src/Starward/Pages/HoyolabToolbox/SpiralAbyssPage.xaml b/src/Starward/Pages/HoyolabToolbox/SpiralAbyssPage.xaml index f9d44bb71..21552406d 100644 --- a/src/Starward/Pages/HoyolabToolbox/SpiralAbyssPage.xaml +++ b/src/Starward/Pages/HoyolabToolbox/SpiralAbyssPage.xaml @@ -223,7 +223,6 @@ - + - + diff --git a/src/Starward/Pages/ImageViewPage.xaml.cs b/src/Starward/Pages/ImageViewPage.xaml.cs index 575299cb8..e6022c6ac 100644 --- a/src/Starward/Pages/ImageViewPage.xaml.cs +++ b/src/Starward/Pages/ImageViewPage.xaml.cs @@ -1,12 +1,12 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using CommunityToolkit.WinUI.UI.Controls; using Microsoft.Extensions.Logging; using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml.Navigation; +using Scighost.WinUI.ImageEx; using Starward.Helpers; using Starward.Models; using System; diff --git a/src/Starward/Pages/LauncherPage.xaml b/src/Starward/Pages/LauncherPage.xaml index 821d34a67..04c14ed2b 100644 --- a/src/Starward/Pages/LauncherPage.xaml +++ b/src/Starward/Pages/LauncherPage.xaml @@ -61,7 +61,6 @@ HorizontalAlignment="Center" VerticalAlignment="Center" sh:PointerCursor.CursorShape="Hand" - IsCacheEnabled="True" IsRightTapEnabled="False" Source="{Binding Img}" Stretch="UniformToFill" diff --git a/src/Starward/Pages/ScreenshotPage.xaml b/src/Starward/Pages/ScreenshotPage.xaml index 0071afa90..d4e1fb90e 100644 --- a/src/Starward/Pages/ScreenshotPage.xaml +++ b/src/Starward/Pages/ScreenshotPage.xaml @@ -3,9 +3,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:actions="using:Microsoft.Xaml.Interactions.Core" xmlns:activity="using:Microsoft.Xaml.Interactivity" - xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations" - xmlns:behaviors="using:CommunityToolkit.WinUI.UI.Behaviors" - xmlns:cc="using:CommunityToolkit.WinUI.UI.Controls" + xmlns:animations="using:CommunityToolkit.WinUI.Animations" + xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:lang="using:Starward.Language" xmlns:local="using:Starward.Pages" @@ -13,7 +12,7 @@ xmlns:media="using:Microsoft.Xaml.Interactions.Media" xmlns:sc="using:Starward.Controls" xmlns:sm="using:Starward.Models" - xmlns:ui="using:CommunityToolkit.WinUI.UI" + xmlns:ui="using:CommunityToolkit.WinUI" x:DefaultBindMode="OneWay" mc:Ignorable="d"> @@ -92,14 +91,11 @@ - + @@ -133,13 +129,15 @@ - + @@ -227,7 +223,7 @@ - + diff --git a/src/Starward/Pages/Setting/AboutSettingPage.xaml b/src/Starward/Pages/Setting/AboutSettingPage.xaml index 8bf793522..6154e6623 100644 --- a/src/Starward/Pages/Setting/AboutSettingPage.xaml +++ b/src/Starward/Pages/Setting/AboutSettingPage.xaml @@ -7,7 +7,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:s="using:Starward" xmlns:sp="using:Starward.Pages" - xmlns:ui="using:CommunityToolkit.WinUI.UI" + xmlns:ui="using:CommunityToolkit.WinUI" x:DefaultBindMode="OneWay" mc:Ignorable="d"> diff --git a/src/Starward/Pages/Welcome/SelectDirectoryPage.xaml b/src/Starward/Pages/Welcome/SelectDirectoryPage.xaml index 77007a3d4..9c53e9d05 100644 --- a/src/Starward/Pages/Welcome/SelectDirectoryPage.xaml +++ b/src/Starward/Pages/Welcome/SelectDirectoryPage.xaml @@ -6,7 +6,7 @@ xmlns:local="using:Starward.Pages.Welcome" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:sp="using:Starward.Pages" - xmlns:ui="using:CommunityToolkit.WinUI.UI" + xmlns:ui="using:CommunityToolkit.WinUI" x:DefaultBindMode="OneWay" mc:Ignorable="d"> diff --git a/src/Starward/Starward.csproj b/src/Starward/Starward.csproj index 12e9a2138..c7b23e8fa 100644 --- a/src/Starward/Starward.csproj +++ b/src/Starward/Starward.csproj @@ -24,9 +24,11 @@ + + + - - + @@ -39,6 +41,7 @@ + diff --git a/src/Starward/Themes/CachedImageStyle.xaml b/src/Starward/Themes/CachedImageStyle.xaml deleted file mode 100644 index 693ed0312..000000000 --- a/src/Starward/Themes/CachedImageStyle.xaml +++ /dev/null @@ -1,79 +0,0 @@ - - - - \ No newline at end of file