mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 21:41:51 +02:00
[Settings] Shortcut UX redesign (#12977)
* Added dialog * Added virtualkey logic * Key logic in place * Styling * Updated layout * Updated foreground * Refactor * Catching error handling * Hotkey UI handling * Spell check * Adding shortcut visuals to OOBE * INtroducing shortcutcontrol for OOBE * Removed unneccasry comments * OOBE fixes * Fix * Visual updates * Update Product.wxs * Updated UI * Update Product.wxs * Changes * Changed installer file * Fixed warner banner height * Added visual key to KBR * Updated margin * pr 12977: fix installer issue (#13075) Co-authored-by: Niels Laute <niels9001@hotmail.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:models="using:Microsoft.PowerToys.Settings.UI.Library"
|
||||
mc:Ignorable="d"
|
||||
x:Name="RootPage"
|
||||
AutomationProperties.LandmarkType="Main">
|
||||
|
||||
<controls:SettingsPageControl x:Uid="ColorPicker"
|
||||
@@ -27,14 +28,9 @@
|
||||
|
||||
<controls:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||
<controls:Setting x:Uid="Activation_Shortcut" Icon="">
|
||||
<controls:Setting.Description>
|
||||
<TextBlock>
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<Run Text="Win, Ctrl, Alt, Shift"/>
|
||||
</TextBlock>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:HotkeySettingsControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" Keys="Win, Ctrl, Alt, Shift"/>
|
||||
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
|
||||
@@ -46,16 +46,9 @@
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="Activation_Shortcut" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
||||
<controls:Setting.Description>
|
||||
<TextBlock>
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<Run Text="Win, Ctrl, Alt, Shift"/>
|
||||
</TextBlock>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:HotkeySettingsControl MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}"
|
||||
Keys="Win, Ctrl, Alt, Shift"/>
|
||||
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:SettingExpander.Header>
|
||||
|
||||
@@ -19,37 +19,11 @@
|
||||
|
||||
|
||||
<DataTemplate x:Key="OriginalKeyTemplate" x:DataType="x:String">
|
||||
<Border Background="{ThemeResource ButtonBackground}"
|
||||
BorderBrush="{ThemeResource ButtonBorderBrush}"
|
||||
BorderThickness="{ThemeResource ButtonBorderThemeThickness}"
|
||||
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||
Padding="{ThemeResource ButtonPadding}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock FontWeight="SemiBold"
|
||||
Foreground="{ThemeResource ButtonForeground}"
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
FontSize="12"
|
||||
Text="{Binding}" />
|
||||
</Border>
|
||||
<controls:KeyVisual Content="{Binding}" VisualType="SmallOutline" />
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="RemappedKeyTemplate" x:DataType="x:String">
|
||||
<Border Background="{ThemeResource ButtonBackground}"
|
||||
BorderBrush="{ThemeResource AccentButtonBackground}"
|
||||
BorderThickness="{ThemeResource ButtonBorderThemeThickness}"
|
||||
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||
Padding="{ThemeResource ButtonPadding}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock FontWeight="SemiBold"
|
||||
Foreground="{ThemeResource AccentButtonBackground}"
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
FontSize="12"
|
||||
Text="{Binding}" />
|
||||
</Border>
|
||||
<controls:KeyVisual Content="{Binding}" VisualType="Small" />
|
||||
</DataTemplate>
|
||||
|
||||
<!--<DataTemplate x:Name="KeysListViewTemplate" x:DataType="Lib:KeysDataModel">
|
||||
|
||||
@@ -37,15 +37,8 @@
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="Activation_Shortcut" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
||||
<controls:Setting.Description>
|
||||
<TextBlock>
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<Run Text="Win, Ctrl, Alt, Shift"/>
|
||||
</TextBlock>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:HotkeySettingsControl HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}"
|
||||
Keys="Win, Ctrl, Alt, Shift"
|
||||
<controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
@@ -30,15 +30,8 @@
|
||||
<controls:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||
|
||||
<controls:Setting x:Uid="Activation_Shortcut" Icon="" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||
<controls:Setting.Description>
|
||||
<TextBlock>
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<Run Text="Win, Ctrl, Alt, Shift"/>
|
||||
</TextBlock>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:HotkeySettingsControl HotkeySettings="{x:Bind Path=ViewModel.OpenShortcutGuide, Mode=TwoWay}"
|
||||
Keys="Win, Ctrl, Alt, Shift"
|
||||
<controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.OpenShortcutGuide, Mode=TwoWay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
@@ -24,43 +24,22 @@
|
||||
|
||||
<controls:SettingsGroup x:Uid="VideoConference_Shortcuts" IsEnabled="{Binding Mode=OneWay, Path=IsEnabled}">
|
||||
<controls:Setting x:Uid="VideoConference_CameraAndMicrophoneMuteHotkeyControl_Header">
|
||||
<controls:Setting.Description>
|
||||
<TextBlock>
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<Run Text="Win, Ctrl, Alt, Shift"/>
|
||||
</TextBlock>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:HotkeySettingsControl HotkeySettings="{x:Bind Path=ViewModel.CameraAndMicrophoneMuteHotkey, Mode=TwoWay}"
|
||||
Keys="Win, Ctrl, Alt, Shift"
|
||||
<controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.CameraAndMicrophoneMuteHotkey, Mode=TwoWay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:Setting x:Uid="VideoConference_MicrophoneMuteHotkeyControl_Header">
|
||||
<controls:Setting.Description>
|
||||
<TextBlock>
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<Run Text="Win, Ctrl, Alt, Shift"/>
|
||||
</TextBlock>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:HotkeySettingsControl HotkeySettings="{x:Bind Path=ViewModel.MicrophoneMuteHotkey, Mode=TwoWay}"
|
||||
Keys="Win, Ctrl, Alt, Shift"
|
||||
<controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.MicrophoneMuteHotkey, Mode=TwoWay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:Setting x:Uid="VideoConference_CameraMuteHotkeyControl_Header">
|
||||
<controls:Setting.Description>
|
||||
<TextBlock>
|
||||
<Run x:Uid="ShortcutWarningLabel"/>
|
||||
<Run Text="Win, Ctrl, Alt, Shift"/>
|
||||
</TextBlock>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:HotkeySettingsControl HotkeySettings="{x:Bind Path=ViewModel.CameraMuteHotkey, Mode=TwoWay}"
|
||||
Keys="Win, Ctrl, Alt, Shift"
|
||||
<controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.CameraMuteHotkey, Mode=TwoWay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
Reference in New Issue
Block a user