Code review cleanup: dead code, unused capability, accessibility gap
- Remove unused `using Microsoft.Win32;` from MainPage.xaml.cs (leftover from the WPF OpenFileDialog era; WinUI uses Windows.Storage.Pickers) - Trim App.xaml.cs down to the two usings it actually needs instead of the full WinUI3 template boilerplate list - Change App.MainWindowInstance to an internal setter (only MainWindow itself should assign it) - Add AutomationProperties.Name to the icon-only Settings button so screen readers announce it (it only had a mouse tooltip before) - Delete Assets/AppIcon.ico: unreferenced by both the manifest and code, the real app icon comes from ApplicationIcon (branding/AmiReel.ico) and AppWindow.SetIcon at runtime - Drop the systemAIModels capability from Package.appxmanifest; the app doesn't call any Windows AI API, so declaring it is an unnecessary privilege request Verified: dotnet build produces 0 warnings/errors, app launches unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-48_altform-lightunplated.png" />
|
||||
<Content Include="Assets\StoreLogo.png" />
|
||||
<Content Include="Assets\AppIcon.ico" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
+2
-16
@@ -1,20 +1,6 @@
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using Microsoft.UI.Xaml.Shapes;
|
||||
using Microsoft.UI.Xaml;
|
||||
using WinRT.Interop;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace AmiReel;
|
||||
|
||||
/// <summary>
|
||||
@@ -24,7 +10,7 @@ public partial class App : Application
|
||||
{
|
||||
private Window? _window;
|
||||
public static IntPtr MainWindowHandle { get; private set; }
|
||||
public static MainWindow? MainWindowInstance { get; set; }
|
||||
public static MainWindow? MainWindowInstance { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 200 KiB |
+2
-1
@@ -113,7 +113,8 @@
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="10">
|
||||
<Button x:Name="OpenSettingsButton" Content="" FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets"
|
||||
Click="OpenSettings_Click" Style="{StaticResource IconButtonStyle}" ToolTipService.ToolTip="Settings" />
|
||||
Click="OpenSettings_Click" Style="{StaticResource IconButtonStyle}"
|
||||
ToolTipService.ToolTip="Settings" AutomationProperties.Name="Settings" />
|
||||
<Button x:Name="CancelButton" Content="Cancel" Click="Cancel_Click" IsEnabled="False" />
|
||||
<Button x:Name="RenderButton" Content="Start render" Click="Render_Click" Style="{StaticResource PrimaryButtonStyle}" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -6,7 +6,6 @@ using AmiReel.Models;
|
||||
using AmiReel.Services;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.Win32;
|
||||
using Windows.ApplicationModel.DataTransfer;
|
||||
using Windows.Storage;
|
||||
using Windows.Storage.Pickers;
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||
xmlns:systemai="http://schemas.microsoft.com/appx/manifest/systemai/windows10"
|
||||
IgnorableNamespaces="uap rescap systemai">
|
||||
IgnorableNamespaces="uap rescap">
|
||||
|
||||
<Identity
|
||||
Name="F004AE73-5989-46F3-B913-E9A3A355713F"
|
||||
@@ -48,6 +47,5 @@
|
||||
|
||||
<Capabilities>
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
<systemai:Capability Name="systemAIModels"/>
|
||||
</Capabilities>
|
||||
</Package>
|
||||
|
||||
Reference in New Issue
Block a user