Compare commits

...

3 Commits

3 changed files with 13 additions and 0 deletions

View File

@@ -45,6 +45,7 @@
x:Uid="ImageResizer_Presets"
HeaderIcon="{ui:FontIcon Glyph=}">
<Button
x:Name="AddSizeButton"
x:Uid="ImageResizer_AddSizeButton"
Click="AddSizeButton_Click"
Style="{ThemeResource AccentButtonStyle}" />

View File

@@ -10,6 +10,7 @@ using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.ViewModels;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Automation;
using Microsoft.UI.Xaml.Controls;
namespace Microsoft.PowerToys.Settings.UI.Views
@@ -27,6 +28,9 @@ namespace Microsoft.PowerToys.Settings.UI.Views
ViewModel = new ImageResizerViewModel(settingsUtils, SettingsRepository<GeneralSettings>.GetInstance(settingsUtils), ShellPage.SendDefaultIPCMessage, loader);
DataContext = ViewModel;
AutomationProperties.SetName(ImageResizerPresets, resourceLoader.GetString("ImageResizer_Presets_Accessibility_Name"));
AutomationProperties.SetName(AddSizeButton, resourceLoader.GetString("ImageResizer_AddSizeButton_Accessibility_Name"));
}
public async void DeleteCustomSize(object sender, RoutedEventArgs e)

View File

@@ -2379,6 +2379,14 @@ From there, simply click on one of the supported files in the File Explorer and
<value>Remove the {0} preset</value>
<comment>Expands to the AutomationProperties.Name value for the Remove button. Example: "Remove the Large preset".</comment>
</data>
<data name="ImageResizer_Presets_Accessibility_Name" xml:space="preserve">
<value>ImageResizer presets</value>
<comment>AutomationProperties.Name for the Image Resizer Presets settings card</comment>
</data>
<data name="ImageResizer_AddSizeButton_Accessibility_Name" xml:space="preserve">
<value>Add a new preset</value>
<comment>AutomationProperties.Name for the Add new size button</comment>
</data>
<data name="No" xml:space="preserve">
<value>No</value>
<comment>Label of a cancel button</comment>