mirror of
https://github.com/Pixeval/Pixeval.git
synced 2025-01-07 03:06:53 +08:00
fix
This commit is contained in:
parent
891aacb374
commit
1b4b16cd07
@ -322,19 +322,16 @@
|
||||
<AppBarSeparator Height="35" Margin="10,0,0,0" />
|
||||
<AppBarButton
|
||||
x:Name="UpscaleButton"
|
||||
Command="{x:Bind _viewModel.CurrentImage.UpscaleCommand, Mode=OneWay}"
|
||||
Icon="{winUi:SymbolIcon Symbol=EyeTracking}"
|
||||
IsCompact="True"
|
||||
LabelPosition="Collapsed"
|
||||
Tapped="UpscaleButton_OnTapped" />
|
||||
<TeachingTip
|
||||
x:Name="UpscaleTeachingTip"
|
||||
x:Uid="/EntryViewerPage/UpscaleTeachingTip"
|
||||
IconSource="{winUi:SymbolIconSource Symbol=CommentNote}"
|
||||
IsLightDismissEnabled="True"
|
||||
Target="{x:Bind UpscaleButton}">
|
||||
<TeachingTip.IconSource>
|
||||
<winUi:SymbolIconSource Symbol="CommentNote" />
|
||||
</TeachingTip.IconSource>
|
||||
</TeachingTip>
|
||||
Target="{x:Bind UpscaleButton}" />
|
||||
<AppBarSeparator Height="35" />
|
||||
<AppBarButton
|
||||
Command="{x:Bind _viewModel.FullScreenCommand}"
|
||||
|
@ -285,11 +285,24 @@ public sealed partial class IllustrationViewerPage
|
||||
teachingTip.Target = appBarButton.IsInOverflow ? null : appBarButton;
|
||||
}
|
||||
|
||||
private void UpscaleButton_OnTapped(object sender, TappedRoutedEventArgs e)
|
||||
private async void UpscaleButton_OnTapped(object sender, TappedRoutedEventArgs e)
|
||||
{
|
||||
if (!App.AppViewModel.AppSettings.ShowUpscalerTeachingTip)
|
||||
{
|
||||
_viewModel.CurrentImage.UpscaleCommand.Execute(null);
|
||||
return;
|
||||
}
|
||||
UpscaleTeachingTip.IsOpen = true;
|
||||
var dialog = await HWnd.CreateOkCancelAsync(EntryViewerPageResources.AiUpscalerWarningTitle,
|
||||
EntryViewerPageResources.AiUpscalerWarningContent,
|
||||
EntryViewerPageResources.AiUpscalerWarningOkButtonContent,
|
||||
EntryViewerPageResources.AiUpscalerWarningCancelButtonContent);
|
||||
|
||||
if (dialog == ContentDialogResult.Primary)
|
||||
{
|
||||
_viewModel.CurrentImage.UpscaleCommand.Execute(null);
|
||||
}
|
||||
|
||||
if (App.AppViewModel.AppSettings.ShowUpscalerTeachingTip)
|
||||
{
|
||||
App.AppViewModel.AppSettings.ShowUpscalerTeachingTip = false;
|
||||
|
@ -56,7 +56,7 @@ public partial class IllustrationViewerPageViewModel : DetailedUiObservableObjec
|
||||
private int _upscalerProgress;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _upscalerProgressText;
|
||||
private string? _upscalerProgressText;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
0
src/Pixeval/Properties/AssemblyInfo.cs
Normal file
0
src/Pixeval/Properties/AssemblyInfo.cs
Normal file
@ -48,5 +48,9 @@
|
||||
"BrowsingCompressedImage": "由于您未在设置中打开\"浏览时查看原图\"选项,因此该页面会显示压缩后的图片,若想要浏览原图,请在设置中打开对应选项",
|
||||
"AiUpscaled": "AI超分辨率缩放已完成",
|
||||
"UpscaleTeachingTip/Title": "该功能有多个可调节选项!",
|
||||
"UpscaleTeachingTip/Subtitle": "您可以在设置中调节AI超分辨率缩放的选项,以获得最佳效果"
|
||||
"UpscaleTeachingTip/Subtitle": "您可以在设置中调节AI超分辨率缩放的选项,以获得最佳效果",
|
||||
"AiUpscalerWarningTitle": "AI超分辨率功能使用提示",
|
||||
"AiUpscalerWarningContent": "AI超分辨率缩放功能需要消耗大量资源(内存消耗达到1-2G),可能会导致设备卡顿,建议在拥有较高性能CPU/GPU以及较高内存的设备上使用",
|
||||
"AiUpscalerWarningOkButtonContent": "继续使用",
|
||||
"AiUpscalerWarningCancelButtonContent": "取消使用"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user