diff --git a/src/settings-ui/Settings.UI.Library/HotkeySettings.cs b/src/settings-ui/Settings.UI.Library/HotkeySettings.cs
index 0eedebefdd..8b268d42c6 100644
--- a/src/settings-ui/Settings.UI.Library/HotkeySettings.cs
+++ b/src/settings-ui/Settings.UI.Library/HotkeySettings.cs
@@ -121,13 +121,15 @@ namespace Microsoft.PowerToys.Settings.UI.Library
if (Shift)
{
shortcutList.Add("Shift");
- // shortcutList.Add(16); // The Shift key or button.
+
+ // shortcutList.Add(16); // The Shift key or button. Cauases accessibility issues.
}
if (Code > 0)
{
switch (Code)
{
+ // using these also causes accessibility issues
// https://learn.microsoft.com/uwp/api/windows.system.virtualkey?view=winrt-20348
case 38: // The Up Arrow key or button.
case 40: // The Down Arrow key or button.
diff --git a/src/settings-ui/Settings.UI/Converters/KeyVisualTemplateSelector.cs b/src/settings-ui/Settings.UI/Converters/KeyVisualTemplateSelector.cs
deleted file mode 100644
index 43e993912a..0000000000
--- a/src/settings-ui/Settings.UI/Converters/KeyVisualTemplateSelector.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) Microsoft Corporation
-// The Microsoft Corporation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Microsoft.PowerToys.Settings.UI.Library;
-using Microsoft.UI.Xaml;
-using Microsoft.UI.Xaml.Controls;
-
-namespace Microsoft.PowerToys.Settings.UI.Converters
-{
- internal sealed partial class KeyVisualTemplateSelector : DataTemplateSelector
- {
- public DataTemplate KeyVisualTemplate { get; set; }
-
- public DataTemplate CommaTemplate { get; set; }
-
- protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
- {
- var stringValue = item as string;
- return stringValue == KeysDataModel.CommaSeparator ? CommaTemplate : KeyVisualTemplate;
- }
- }
-}
diff --git a/src/settings-ui/Settings.UI/Converters/ModuleItemTemplateSelector.cs b/src/settings-ui/Settings.UI/Converters/ModuleItemTemplateSelector.cs
index 1374c16482..bfc05b5deb 100644
--- a/src/settings-ui/Settings.UI/Converters/ModuleItemTemplateSelector.cs
+++ b/src/settings-ui/Settings.UI/Converters/ModuleItemTemplateSelector.cs
@@ -10,23 +10,17 @@ namespace Microsoft.PowerToys.Settings.UI.Converters
{
public partial class ModuleItemTemplateSelector : DataTemplateSelector
{
- public DataTemplate TextTemplate { get; set; }
-
- public DataTemplate ButtonTemplate { get; set; }
-
public DataTemplate ShortcutTemplate { get; set; }
- public DataTemplate KBMTemplate { get; set; }
+ public DataTemplate ActivationTemplate { get; set; }
protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
{
switch (item)
{
- case DashboardModuleButtonItem: return ButtonTemplate;
case DashboardModuleShortcutItem: return ShortcutTemplate;
- case DashboardModuleTextItem: return TextTemplate;
- case DashboardModuleKBMItem: return KBMTemplate;
- default: return TextTemplate;
+ case DashboardModuleActivationItem: return ActivationTemplate;
+ default: return ActivationTemplate;
}
}
}
diff --git a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj
index 2451855cd2..1c9cc28ff6 100644
--- a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj
+++ b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj
@@ -22,6 +22,8 @@
+
+
@@ -132,6 +134,12 @@
Always
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml
index c1a5392bdc..809f661878 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml
@@ -3,17 +3,19 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
+ xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters">
-
+
+
@@ -26,19 +28,28 @@
x:Key="BoolToVisibilityConverter"
FalseValue="Collapsed"
TrueValue="Visible" />
-
-
-
+
+
+
+
2
@@ -46,6 +57,7 @@
16,0,0,0
240
+ 1000
+
+
+
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual.xaml.cs
similarity index 55%
rename from src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.cs
rename to src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual.xaml.cs
index 9d323c636d..4d14734120 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.cs
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual.xaml.cs
@@ -5,6 +5,7 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Markup;
+using Microsoft.UI.Xaml.Media;
using Windows.System;
namespace Microsoft.PowerToys.Settings.UI.Controls
@@ -12,8 +13,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
[TemplatePart(Name = KeyPresenter, Type = typeof(ContentPresenter))]
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
- [TemplateVisualState(Name = "Default", GroupName = "StateStates")]
- [TemplateVisualState(Name = "Error", GroupName = "StateStates")]
+ [TemplateVisualState(Name = "Error", GroupName = "CommonStates")]
public sealed partial class KeyVisual : Control
{
private const string KeyPresenter = "KeyPresenter";
@@ -26,28 +26,19 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
set => SetValue(ContentProperty, value);
}
- public static readonly DependencyProperty ContentProperty = DependencyProperty.Register("Content", typeof(object), typeof(KeyVisual), new PropertyMetadata(default(string), OnContentChanged));
+ public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(nameof(Content), typeof(object), typeof(KeyVisual), new PropertyMetadata(default(string), OnContentChanged));
- public VisualType VisualType
+ public bool IsInvalid
{
- get => (VisualType)GetValue(VisualTypeProperty);
- set => SetValue(VisualTypeProperty, value);
+ get => (bool)GetValue(IsInvalidProperty);
+ set => SetValue(IsInvalidProperty, value);
}
- public static readonly DependencyProperty VisualTypeProperty = DependencyProperty.Register("VisualType", typeof(VisualType), typeof(KeyVisual), new PropertyMetadata(default(VisualType), OnSizeChanged));
-
- public bool IsError
- {
- get => (bool)GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, value);
- }
-
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register("IsError", typeof(bool), typeof(KeyVisual), new PropertyMetadata(false, OnIsErrorChanged));
+ public static readonly DependencyProperty IsInvalidProperty = DependencyProperty.Register(nameof(IsInvalid), typeof(bool), typeof(KeyVisual), new PropertyMetadata(false, OnIsInvalidChanged));
public KeyVisual()
{
this.DefaultStyleKey = typeof(KeyVisual);
- this.Style = GetStyleSize("TextKeyVisualStyle");
}
protected override void OnApplyTemplate()
@@ -56,48 +47,55 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
_keyVisual = (KeyVisual)this;
_keyPresenter = (ContentPresenter)_keyVisual.GetTemplateChild(KeyPresenter);
Update();
- SetEnabledState();
- SetErrorState();
+ SetVisualStates();
IsEnabledChanged += KeyVisual_IsEnabledChanged;
base.OnApplyTemplate();
}
private static void OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- ((KeyVisual)d).Update();
+ ((KeyVisual)d).SetVisualStates();
}
- private static void OnSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ private static void OnIsInvalidChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- ((KeyVisual)d).Update();
+ ((KeyVisual)d).SetVisualStates();
}
- private static void OnIsErrorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ private void SetVisualStates()
{
- ((KeyVisual)d).SetErrorState();
+ if (_keyVisual != null)
+ {
+ if (_keyVisual.IsInvalid)
+ {
+ VisualStateManager.GoToState(_keyVisual, "Invalid", true);
+ }
+ else if (!_keyVisual.IsEnabled)
+ {
+ VisualStateManager.GoToState(_keyVisual, "Disabled", true);
+ }
+ else
+ {
+ VisualStateManager.GoToState(_keyVisual, "Normal", true);
+ }
+ }
}
private void Update()
{
- if (_keyVisual == null)
- {
- return;
- }
-
- if (_keyVisual.Content != null)
+ if (_keyVisual != null && _keyVisual.Content != null)
{
if (_keyVisual.Content.GetType() == typeof(string))
{
- _keyVisual.Style = GetStyleSize("TextKeyVisualStyle");
_keyVisual._keyPresenter.Content = _keyVisual.Content;
+ _keyVisual._keyPresenter.Margin = new Thickness(0, -1, 0, 0);
}
else
{
- _keyVisual.Style = GetStyleSize("IconKeyVisualStyle");
-
+ _keyVisual._keyPresenter.FontSize = _keyVisual.FontSize * 0.8;
+ _keyVisual._keyPresenter.FontFamily = new FontFamily("Segoe Fluent Icons, Segoe MDL2 Assets");
switch ((int)_keyVisual.Content)
{
- /* We can enable other glyphs in the future
case 13: // The Enter key or button.
_keyVisual._keyPresenter.Content = "\uE751"; break;
@@ -107,7 +105,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
case 16: // The right Shift key or button.
case 160: // The left Shift key or button.
case 161: // The Shift key or button.
- _keyVisual._keyPresenter.Content = "\uE752"; break; */
+ _keyVisual._keyPresenter.Content = "\uE752"; break;
case 38: _keyVisual._keyPresenter.Content = "\uE0E4"; break; // The Up Arrow key or button.
case 40: _keyVisual._keyPresenter.Content = "\uE0E5"; break; // The Down Arrow key or button.
@@ -116,13 +114,13 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
case 91: // The left Windows key
case 92: // The right Windows key
- PathIcon winIcon = XamlReader.Load(@"") as PathIcon;
+ PathIcon winIcon = XamlReader.Load(@"") as PathIcon;
Viewbox winIconContainer = new Viewbox();
winIconContainer.Child = winIcon;
winIconContainer.HorizontalAlignment = HorizontalAlignment.Center;
winIconContainer.VerticalAlignment = VerticalAlignment.Center;
- double iconDimensions = GetIconSize();
+ double iconDimensions = _keyVisual.FontSize * 0.8; // Adjust the size of the icon based on the font size
winIconContainer.Height = iconDimensions;
winIconContainer.Width = iconDimensions;
_keyVisual._keyPresenter.Content = winIconContainer;
@@ -133,59 +131,9 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
}
}
- public Style GetStyleSize(string styleName)
- {
- if (VisualType == VisualType.Small)
- {
- return (Style)App.Current.Resources["Small" + styleName];
- }
- else if (VisualType == VisualType.SmallOutline)
- {
- return (Style)App.Current.Resources["SmallOutline" + styleName];
- }
- else if (VisualType == VisualType.TextOnly)
- {
- return (Style)App.Current.Resources["Only" + styleName];
- }
- else
- {
- return (Style)App.Current.Resources["Default" + styleName];
- }
- }
-
- public double GetIconSize()
- {
- if (VisualType == VisualType.Small || VisualType == VisualType.SmallOutline)
- {
- return (double)App.Current.Resources["SmallIconSize"];
- }
- else
- {
- return (double)App.Current.Resources["DefaultIconSize"];
- }
- }
-
private void KeyVisual_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
{
- SetEnabledState();
+ SetVisualStates();
}
-
- private void SetErrorState()
- {
- VisualStateManager.GoToState(this, IsError ? "Error" : "Default", true);
- }
-
- private void SetEnabledState()
- {
- VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true);
- }
- }
-
- public enum VisualType
- {
- Small,
- SmallOutline,
- TextOnly,
- Large,
}
}
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml
deleted file mode 100644
index 00192a215a..0000000000
--- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml
+++ /dev/null
@@ -1,174 +0,0 @@
-
-
- 16
- 12
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl/OOBEPageControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl.xaml
similarity index 100%
rename from src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl/OOBEPageControl.xaml
rename to src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl.xaml
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl/OOBEPageControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl.xaml.cs
similarity index 100%
rename from src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl/OOBEPageControl.xaml.cs
rename to src/settings-ui/Settings.UI/SettingsXAML/Controls/OOBEPageControl.xaml.cs
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml
index c115d1febe..09b2d7d26a 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml
@@ -31,8 +31,7 @@
VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw"
Content="{Binding}"
- IsTabStop="False"
- VisualType="SmallOutline" />
+ IsTabStop="False" />
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.xaml.cs
similarity index 100%
rename from src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.cs
rename to src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsGroup/SettingsGroup.xaml.cs
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml
index a49c93a518..79da81123c 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml
@@ -9,17 +9,10 @@
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
Loaded="UserControl_Loaded"
mc:Ignorable="d">
-
1000
1020
-
-
@@ -62,7 +55,7 @@
MaxWidth="160"
HorizontalAlignment="Left"
VerticalAlignment="Top"
- CornerRadius="4">
+ CornerRadius="{StaticResource OverlayCornerRadius}">
@@ -113,7 +106,7 @@
MaxWidth="{StaticResource PageMaxWidth}"
AutomationProperties.Name="{x:Bind SecondaryLinksHeader}"
Orientation="Vertical"
- Visibility="{x:Bind SecondaryLinks.Count, Converter={StaticResource doubleToVisibilityConverter}}">
+ Visibility="{x:Bind SecondaryLinks.Count, Converter={StaticResource DoubleToVisibilityConverter}}">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs
index e33127572d..c75017300c 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutControl.xaml.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System;
-
using CommunityToolkit.WinUI;
using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library;
@@ -11,6 +10,7 @@ using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Automation;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
+using Microsoft.Windows.ApplicationModel.Resources;
using Windows.System;
namespace Microsoft.PowerToys.Settings.UI.Controls
@@ -36,6 +36,8 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
public static readonly DependencyProperty AllowDisableProperty = DependencyProperty.Register("AllowDisable", typeof(bool), typeof(ShortcutControl), new PropertyMetadata(false, OnAllowDisableChanged));
+ private static ResourceLoader resourceLoader = Helpers.ResourceLoaderInstance.ResourceLoader;
+
private static void OnAllowDisableChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var me = d as ShortcutControl;
@@ -50,8 +52,6 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
return;
}
- var resourceLoader = Helpers.ResourceLoaderInstance.ResourceLoader;
-
var newValue = (bool)(e?.NewValue ?? false);
var text = newValue ? resourceLoader.GetString("Activation_Shortcut_With_Disable_Description") : resourceLoader.GetString("Activation_Shortcut_Description");
@@ -103,8 +103,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
{
hotkeySettings = value;
SetValue(HotkeySettingsProperty, value);
- PreviewKeysControl.ItemsSource = HotkeySettings.GetKeysList();
- AutomationProperties.SetHelpText(EditButton, HotkeySettings.ToString());
+ SetKeys();
c.Keys = HotkeySettings.GetKeysList();
}
}
@@ -118,8 +117,6 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
this.Unloaded += ShortcutControl_Unloaded;
this.Loaded += ShortcutControl_Loaded;
- var resourceLoader = Helpers.ResourceLoaderInstance.ResourceLoader;
-
// We create the Dialog in C# because doing it in XAML is giving WinUI/XAML Island bugs when using dark theme.
shortcutDialog = new ContentDialog
{
@@ -433,11 +430,9 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
hotkeySettings = null;
SetValue(HotkeySettingsProperty, hotkeySettings);
- PreviewKeysControl.ItemsSource = HotkeySettings.GetKeysList();
+ SetKeys();
lastValidSettings = hotkeySettings;
-
- AutomationProperties.SetHelpText(EditButton, HotkeySettings.ToString());
shortcutDialog.Hide();
}
@@ -448,8 +443,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
HotkeySettings = lastValidSettings with { };
}
- PreviewKeysControl.ItemsSource = hotkeySettings.GetKeysList();
- AutomationProperties.SetHelpText(EditButton, HotkeySettings.ToString());
+ SetKeys();
shortcutDialog.Hide();
}
@@ -462,9 +456,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
var empty = new HotkeySettings();
HotkeySettings = empty;
-
- PreviewKeysControl.ItemsSource = HotkeySettings.GetKeysList();
- AutomationProperties.SetHelpText(EditButton, HotkeySettings.ToString());
+ SetKeys();
shortcutDialog.Hide();
}
@@ -525,5 +517,22 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
+
+ private void SetKeys()
+ {
+ var keys = HotkeySettings.GetKeysList();
+
+ if (keys != null && keys.Count > 0)
+ {
+ VisualStateManager.GoToState(this, "Configured", true);
+ PreviewKeysControl.ItemsSource = keys;
+ AutomationProperties.SetHelpText(EditButton, HotkeySettings.ToString());
+ }
+ else
+ {
+ VisualStateManager.GoToState(this, "Normal", true);
+ AutomationProperties.SetHelpText(EditButton, resourceLoader.GetString("ConfigureShortcut"));
+ }
+ }
}
}
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml
index 8765a3d4b3..af79b39ac7 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml
@@ -35,11 +35,15 @@
+ Style="{StaticResource AccentKeyVisualStyle}" />
@@ -51,14 +55,12 @@
Orientation="Vertical"
Spacing="8">
-
-
+ FontSize="12"
+ IsTabStop="False" />
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml
index 163922236e..86e123dac9 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml
@@ -10,14 +10,6 @@
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
xmlns:viewModels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
mc:Ignorable="d">
-
-
-
-
-
@@ -89,7 +81,7 @@
VerticalAlignment="Center"
FontSize="16"
Glyph=""
- Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}">
+ Visibility="{x:Bind IsLocked, Converter={StaticResource ReverseBoolToVisibilityConverter}, ConverterParameter=True, Mode=OneWay}">
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml
index 67d8030b16..a5e6f2de40 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml
@@ -21,7 +21,6 @@
-
@@ -110,7 +109,7 @@
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Themes/Generic.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Themes/Generic.xaml
index b1c5f79256..6a68895c50 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Themes/Generic.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Themes/Generic.xaml
@@ -2,7 +2,7 @@
-
-
+
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml
index 5c4a09a9c4..34305e3529 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/CmdNotFoundPage.xaml
@@ -10,13 +10,6 @@
xmlns:ui="using:CommunityToolkit.WinUI"
AutomationProperties.LandmarkType="Main"
mc:Ignorable="d">
-
-
-
-
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml
index 5295cf2df4..7ac03ead81 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml
@@ -14,14 +14,8 @@
d:DataContext="{d:DesignInstance Type=viewModels:ColorPickerViewModel}"
AutomationProperties.LandmarkType="Main"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs
index 394b1d6de6..53ff1951a9 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/DashboardPage.xaml.cs
@@ -5,7 +5,6 @@
using System;
using System.Threading;
using System.Threading.Tasks;
-
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library;
@@ -55,5 +54,19 @@ namespace Microsoft.PowerToys.Settings.UI.Views
{
ViewModel.DashboardListItemClick(sender);
}
+
+ private void WhatsNewButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (App.GetOobeWindow() == null)
+ {
+ App.SetOobeWindow(new OobeWindow(Microsoft.PowerToys.Settings.UI.OOBE.Enums.PowerToysModules.WhatsNew));
+ }
+ else
+ {
+ App.GetOobeWindow().SetAppWindow(OOBE.Enums.PowerToysModules.WhatsNew);
+ }
+
+ App.GetOobeWindow().Activate();
+ }
}
}
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml
index 51118fea10..da5bcd7e0c 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml
@@ -12,7 +12,6 @@
mc:Ignorable="d">
-
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml
index f6e7a3fddb..b816fccf09 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/KeyboardManagerPage.xaml
@@ -14,22 +14,23 @@
-
-
-
-
+
-
+