mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
resolved merge conflicts and validated that it works as expected
This commit is contained in:
@@ -6,36 +6,25 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
AutomationProperties.Name="{x:Bind Header, Mode=OneTime}"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="400">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBox x:Name="HotkeyTextBox"
|
||||
x:Uid="SettingsPage_SetShortcut"
|
||||
AutomationProperties.HelpText="{Binding ElementName=ShortcutWarningLabelText, Path=Text}"
|
||||
IsReadOnly="True">
|
||||
<ToolTipService.ToolTip>
|
||||
<ToolTip>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock x:Uid="ShortcutWarningLabel"/>
|
||||
<TextBlock Text="{x:Bind Keys, Mode=OneTime}" FontWeight="SemiBold"/>
|
||||
</StackPanel>
|
||||
</ToolTip>
|
||||
<TextBlock x:Name="ShortcutWarningLabelText">
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<LineBreak/>
|
||||
<Run Text="{x:Bind Keys, Mode=OneTime}" FontWeight="SemiBold"/>
|
||||
</TextBlock>
|
||||
</ToolTipService.ToolTip>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="TitleText"
|
||||
Text="{x:Bind Header, Mode=OneTime}"
|
||||
Foreground="{Binding Path=IsEnabled, ElementName=HotkeyTextBox, Converter={StaticResource ModuleEnabledToForegroundConverter}}"
|
||||
/>
|
||||
|
||||
<TextBlock x:Uid="SettingsPage_SetShortcut_Glyph"
|
||||
x:Name="TitleGlyph" Text=""
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Margin="4,4,0,0"
|
||||
Foreground="{Binding Path=IsEnabled, ElementName=HotkeyTextBox, Converter={StaticResource ModuleEnabledToForegroundConverter}}"
|
||||
/>
|
||||
|
||||
</StackPanel>
|
||||
<TextBox x:Uid="SettingsPage_SetShortcut"
|
||||
x:Name="HotkeyTextBox"
|
||||
Margin="0,5,0,0"
|
||||
IsReadOnly="True"
|
||||
/>
|
||||
</StackPanel>
|
||||
<TextBox.Header>
|
||||
<TextBlock>
|
||||
<Run Text="{x:Bind Header, Mode=OneTime}"/>
|
||||
<Run Text="" FontFamily="Segoe MDL2 Assets"/>
|
||||
</TextBlock>
|
||||
</TextBox.Header>
|
||||
</TextBox>
|
||||
</UserControl>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -62,10 +62,10 @@
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
AutomationProperties.LabeledBy="{Binding ElementName=FancyZones_LaunchEditorButtonControl}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Viewbox Height="12" Width="12">
|
||||
<PathIcon Data="M896 0v896H0V0h896zM768 768V128H128v640h640zM0 1920v-896h1920v896H0zm128-768v640h1664v-640H128zM1024 0h896v896h-896V0zm768 768V128h-640v640h640z"/>
|
||||
<Viewbox Height="14" Width="14" Margin="-1,1,0,0">
|
||||
<PathIcon Data="M45,48H25.5V45H45V25.5H25.5v-3H45V3H25.5V0H48V48ZM22.5,48H3V45H22.5V3H3V0H25.5V48ZM0,48V0H3V48Z"/>
|
||||
</Viewbox>
|
||||
<TextBlock Margin="12,0,0,0"
|
||||
<TextBlock Margin="8,0,0,0"
|
||||
Name="FancyZones_LaunchEditorButtonControl"
|
||||
x:Uid="FancyZones_LaunchEditorButtonControl"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -89,21 +89,19 @@
|
||||
|
||||
<!-- Replaced the Radiobuttons parent control with a StackPanel to mitigate the Tab and Arrow key related keyboard navigation issues due to XAML Islands
|
||||
Tracking issue in the winui repository - https://github.com/microsoft/microsoft-ui-xaml/issues/3156 -->
|
||||
<TextBlock Name="RadioButtons_Name_Theme"
|
||||
x:Uid="RadioButtons_Name_Theme"
|
||||
<TextBlock x:Name="RadioButtons_Name_Theme"
|
||||
x:Uid="ColorModeHeader"
|
||||
Margin="{StaticResource SmallTopMargin}"/>
|
||||
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=RadioButtons_Name_Theme}">
|
||||
<RadioButton x:Uid="GeneralPage_Radio_Theme_Dark"
|
||||
Content="Dark"
|
||||
<RadioButton x:Uid="Radio_Theme_Dark"
|
||||
IsChecked="{ Binding Mode=TwoWay, Path=IsDarkThemeRadioButtonChecked}"/>
|
||||
|
||||
<RadioButton x:Uid="GeneralPage_Radio_Theme_Light"
|
||||
Content="Light"
|
||||
<RadioButton x:Uid="Radio_Theme_Light"
|
||||
IsChecked="{ Binding Mode=TwoWay, Path=IsLightThemeRadioButtonChecked}"/>
|
||||
|
||||
<RadioButton x:Uid="GeneralPage_Radio_Theme_Default"
|
||||
Content="System default"
|
||||
<RadioButton x:Uid="Radio_Theme_Default"
|
||||
IsChecked="{ Binding Mode=TwoWay, Path=IsSystemThemeRadioButtonChecked}"/>
|
||||
<HyperlinkButton x:Uid="Windows_Color_Settings" NavigateUri="ms-settings:colors"/>
|
||||
</StackPanel>
|
||||
|
||||
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_RunAtStartUp"
|
||||
|
||||
@@ -65,7 +65,8 @@
|
||||
SelectionMode="None"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True">
|
||||
ScrollViewer.IsHorizontalRailEnabled="True"
|
||||
ContainerContentChanging="ImagesSizesListView_ContainerContentChanging">
|
||||
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
@@ -277,7 +278,9 @@
|
||||
x:Uid="ImageResizer_FilenameFormatPlaceholder"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
AutomationProperties.LabeledBy="{Binding ElementName=ImageResizer_FilenameFormatHeader}">
|
||||
AutomationProperties.LabeledBy="{Binding ElementName=ImageResizer_FilenameFormatHeader}"
|
||||
AutomationProperties.HelpText="{Binding ElementName=FileFormatTextBlock, Path=Text}"
|
||||
>
|
||||
<TextBox.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Name="ImageResizer_FilenameFormatHeader"
|
||||
@@ -290,44 +293,34 @@
|
||||
</StackPanel>
|
||||
</TextBox.Header>
|
||||
<ToolTipService.ToolTip>
|
||||
<StackPanel>
|
||||
<TextBlock x:Uid="ImageResizer_FileFormatDescription"/>
|
||||
<TextBlock Margin="{StaticResource SmallTopMargin}">
|
||||
<Run Text="%1" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_Filename" />
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock>
|
||||
<Run Text="%2" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_Sizename"/>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock>
|
||||
<Run Text="%3" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_SelectedWidth"/>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock>
|
||||
<Run Text="%4" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_SelectedHeight"/>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock>
|
||||
<Run Text="%5" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_ActualWidth"/>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock>
|
||||
<Run Text="%6" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_ActualHeight"/>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<TextBlock x:Name="FileFormatTextBlock">
|
||||
<Run x:Uid="ImageResizer_FileFormatDescription"/>
|
||||
<LineBreak/>
|
||||
<LineBreak/>
|
||||
<Run Text="%1" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_Filename" />
|
||||
<LineBreak/>
|
||||
<Run Text="%2" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_Sizename"/>
|
||||
<LineBreak/>
|
||||
<Run Text="%3" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_SelectedWidth"/>
|
||||
<LineBreak/>
|
||||
<Run Text="%4" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_SelectedHeight"/>
|
||||
<LineBreak/>
|
||||
<Run Text="%5" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_ActualWidth"/>
|
||||
<LineBreak/>
|
||||
<Run Text="%6" FontWeight="Bold" />
|
||||
<Run Text=" - "/>
|
||||
<Run x:Uid="ImageResizer_Formatting_ActualHeight"/>
|
||||
</TextBlock>
|
||||
</ToolTipService.ToolTip>
|
||||
</TextBox>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Linq;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
|
||||
@@ -45,5 +46,18 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void ImagesSizesListView_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
|
||||
{
|
||||
if (ViewModel.IsListViewFocusRequested)
|
||||
{
|
||||
// Set focus to the last item in the ListView
|
||||
int size = ImagesSizesListView.Items.Count;
|
||||
((ListViewItem)ImagesSizesListView.ContainerFromIndex(size - 1)).Focus(FocusState.Programmatic);
|
||||
|
||||
// Reset the focus requested flag
|
||||
ViewModel.IsListViewFocusRequested = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,19 +146,28 @@
|
||||
<TextBlock x:Uid="Appearance_GroupSettings"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
||||
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher, Converter={StaticResource ModuleEnabledToForegroundConverter}}" />
|
||||
<TextBlock x:Uid="PowerLauncher_Theme"
|
||||
|
||||
<!-- We cannot navigate to all the radio buttons using the arrow keys because of an XYNavigation issue in the RadioButtons control.
|
||||
The screen reader does not read the heading when we tab into a radio button, even though the LabeledBy automation property is set.
|
||||
Link to the issue in the winui repository - https://github.com/microsoft/microsoft-ui-xaml/issues/3156 -->
|
||||
<TextBlock x:Uid="ColorModeHeader"
|
||||
x:Name="RadioButtons_Name_Theme"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher, Converter={StaticResource ModuleEnabledToForegroundConverter}}" />
|
||||
<muxc:RadioButtons IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<RadioButton x:Uid="PowerLauncher_Radio_Theme_Dark"
|
||||
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=RadioButtons_Name_Theme}">
|
||||
<RadioButton x:Uid="Radio_Theme_Dark"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||
IsChecked="{Binding Mode=TwoWay, Path=IsDarkThemeRadioButtonChecked}" />
|
||||
|
||||
<RadioButton x:Uid="PowerLauncher_Radio_Theme_Light"
|
||||
<RadioButton x:Uid="Radio_Theme_Light"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||
IsChecked="{Binding Mode=TwoWay, Path=IsLightThemeRadioButtonChecked}" />
|
||||
|
||||
<RadioButton x:Uid="PowerLauncher_Radio_Theme_Default"
|
||||
<RadioButton x:Uid="Radio_Theme_Default"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||
IsChecked="{Binding Mode=TwoWay, Path=IsSystemThemeRadioButtonChecked}" />
|
||||
</muxc:RadioButtons>
|
||||
<HyperlinkButton x:Uid="Windows_Color_Settings" NavigateUri="ms-settings:colors"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<RelativePanel x:Name="SidePanel"
|
||||
|
||||
@@ -41,10 +41,9 @@
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_FancyZones" helpers:NavHelper.NavigateTo="views:FancyZonesPage" AutomationProperties.HeadingLevel="Level1">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<PathIcon Data="M896 0v896H0V0h896zM768 768V128H128v640h640zM0 1920v-896h1920v896H0zm128-768v640h1664v-640H128zM1024 0h896v896h-896V0zm768 768V128h-640v640h640z"></PathIcon>
|
||||
<PathIcon Data="M45,48H25.5V45H45V25.5H25.5v-3H45V3H25.5V0H48V48ZM22.5,48H3V45H22.5V3H3V0H25.5V48ZM0,48V0H3V48Z"/>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
@@ -54,35 +53,30 @@
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_ImageResizer" helpers:NavHelper.NavigateTo="views:ImageResizerPage" AutomationProperties.HeadingLevel="Level1">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<PathIcon Data="M0 768h1408v1152H0V768zm128 1024h870l-582-581-288 288v293zm1152 0v-102l-224-223-101 101 223 224h102zM128 896v421l288-287 448 447 192-191 224 224V896H128zm832 256q-26 0-45-19t-19-45q0-26 19-45t45-19q26 0 45 19t19 45q0 26-19 45t-45 19zm960-512V347l-339 338-90-90 338-339h-293V128h512v512h-128zm-768-512h256v128h-256V128zm-128 128H768V128h256v128zm-384 0H384V128h256v128zm-384 0H0V128h256v128zM128 640H0V384h128v256zm1920 128v256h-128V768h128zm-128 384h128v256h-128v-256zm0 384h128v256h-128v-256zm-384 256h256v128h-256v-128z"></PathIcon>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_KeyboardManager" helpers:NavHelper.NavigateTo="views:KeyboardManagerPage" AutomationProperties.HeadingLevel="Level1">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_PowerRename" helpers:NavHelper.NavigateTo="views:PowerRenamePage" AutomationProperties.HeadingLevel="Level1">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_PowerLauncher" helpers:NavHelper.NavigateTo="views:PowerLauncherPage" AutomationProperties.HeadingLevel="Level1">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
</winui:NavigationViewItem.Icon>
|
||||
</winui:NavigationViewItem>
|
||||
|
||||
<!-- TO DO: Update icon -->
|
||||
<winui:NavigationViewItem x:Uid="Shell_ShortcutGuide" helpers:NavHelper.NavigateTo="views:ShortcutGuidePage" AutomationProperties.HeadingLevel="Level1">
|
||||
<winui:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
@@ -94,7 +88,6 @@
|
||||
DefaultHeader="{x:Bind ViewModel.Selected.Content, Mode=OneWay}">
|
||||
<behaviors:NavigationViewHeaderBehavior.DefaultHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<!-- TODO: Style clean up-->
|
||||
<Grid Margin="0, -2, 0, 6">
|
||||
<TextBlock
|
||||
Text="{Binding}"
|
||||
|
||||
@@ -90,17 +90,18 @@
|
||||
The screen reader does not read the heading when we tab into a radio button, even though the LabeledBy automation property is set.
|
||||
Link to the issue in the winui repository - https://github.com/microsoft/microsoft-ui-xaml/issues/3156 -->
|
||||
<TextBlock Name="ShortcutGuide_Theme"
|
||||
x:Uid="ShortcutGuide_Theme"
|
||||
x:Uid="ColorModeHeader"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
|
||||
<muxc:RadioButtons IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}"
|
||||
Margin="{StaticResource XXSmallTopMargin}"
|
||||
AutomationProperties.LabeledBy="{Binding ElementName=ShortcutGuide_Theme}">
|
||||
<RadioButton x:Uid="GeneralPage_Radio_Theme_Dark" />
|
||||
<RadioButton x:Uid="GeneralPage_Radio_Theme_Light" />
|
||||
<RadioButton x:Uid="GeneralPage_Radio_Theme_Default"/>
|
||||
<RadioButton x:Uid="Radio_Theme_Dark" />
|
||||
<RadioButton x:Uid="Radio_Theme_Light" />
|
||||
<RadioButton x:Uid="Radio_Theme_Default"/>
|
||||
</muxc:RadioButtons>
|
||||
<HyperlinkButton x:Uid="Windows_Color_Settings" NavigateUri="ms-settings:colors"/>
|
||||
</StackPanel>
|
||||
|
||||
<RelativePanel x:Name="SidePanel"
|
||||
|
||||
Reference in New Issue
Block a user