Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
72f62c5
Cleaning up Controls folder
niels9001 Jun 20, 2025
e1bcf62
Adding Card control
niels9001 Jun 20, 2025
faab625
Dashboard changes
niels9001 Jun 20, 2025
d28ebcd
Remove KBM dashboard item and related code
niels9001 Jun 23, 2025
0aff642
Adding shortcuts view
niels9001 Jun 23, 2025
1d43842
More shortcuts
niels9001 Jun 23, 2025
ef51252
Refactor KeyVisual for better UX customization
niels9001 Jun 24, 2025
f162449
Updating shortcut strings
niels9001 Jun 24, 2025
e08ef9c
Enabling resizing
niels9001 Jun 24, 2025
5457b27
Adding icons to the quick actions
niels9001 Jun 25, 2025
c1564db
CI fixes
niels9001 Jun 27, 2025
40fc456
More shortcut visual refactoring
niels9001 Jun 27, 2025
ab58418
More changes
niels9001 Jun 27, 2025
cb3afc7
Merge branch 'main' into niels9001/new-dashboard-ux
niels9001 Jun 27, 2025
3e14b3a
Add missing tag
niels9001 Jul 1, 2025
dbd2ea5
Moving Update and ShortcutConflicts to dedicated controls so they can…
niels9001 Jul 1, 2025
d1e702c
Fix
niels9001 Jul 1, 2025
5f748f8
Bringing back the icon for the shortcut control
niels9001 Jul 1, 2025
2dcf202
Styles refactor
niels9001 Jul 1, 2025
6c933f3
Update SettingsPageControl.xaml
niels9001 Jul 3, 2025
48b782a
Merge branch 'main' into niels9001/new-dashboard-ux
niels9001 Jul 4, 2025
2dc6bdb
Update App.xaml
niels9001 Jul 4, 2025
8fb55c0
Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
niels9001 Jul 10, 2025
d851811
Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
niels9001 Jul 10, 2025
cc419af
Update KeyVisual.xaml
niels9001 Jul 11, 2025
e165479
Fixed a few accessibility issues. Improper name fields and such
Jaylyn-Barbee Jul 14, 2025
afa4317
Merge branch 'main' of https://github.com/Jaylyn-Barbee/PowerToys int…
Jaylyn-Barbee Jul 16, 2025
1f25860
merging main
Jaylyn-Barbee Jul 17, 2025
7423649
testing
Jaylyn-Barbee Jul 17, 2025
32da7d8
Recovered work
Jaylyn-Barbee Jul 17, 2025
4b7b48d
spelling issue + xaml formatting
Jaylyn-Barbee Jul 17, 2025
93a1e65
ran xaml formatter on unfomratted file
Jaylyn-Barbee Jul 17, 2025
7e6c6d8
Replace the word 'launch' with 'open' since we shouldn't use 'launch'…
Jaylyn-Barbee Jul 17, 2025
011fc69
fixed a11y issue with glyphs in keyvisual + removed unneeded line
Jaylyn-Barbee Jul 17, 2025
2064325
Fixed dashboard page styling
Jaylyn-Barbee Jul 17, 2025
5cd8337
fixed AOT issue with windows logo in keyvisual
Jaylyn-Barbee Jul 18, 2025
32ed3db
xaml formatting
Jaylyn-Barbee Jul 18, 2025
b42e39b
Added back string for 'Update Available'
Jaylyn-Barbee Jul 21, 2025
4c38bab
fixed wrap layout issue
Jaylyn-Barbee Jul 21, 2025
fb611a7
Address comments
niels9001 Jul 31, 2025
47401f2
Cleaning up and loccing KeyVisual
niels9001 Jul 31, 2025
8a62b76
Refactoring KeyVisual (#40904)
niels9001 Jul 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/settings-ui/Settings.UI.Library/HotkeySettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ public List<object> GetKeysList()

if (Shift)
{
shortcutList.Add("Shift");

// shortcutList.Add(16); // The Shift key or button.
shortcutList.Add(16); // The Shift key or button.
}

if (Code > 0)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/settings-ui/Settings.UI/PowerToys.Settings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<ItemGroup>
<None Remove="Assets\Settings\Modules\APDialog.dark.png" />
<None Remove="Assets\Settings\Modules\APDialog.light.png" />
<None Remove="SettingsXAML\Controls\Dashboard\CheckUpdateControl.xaml" />
<None Remove="SettingsXAML\Controls\Dashboard\ShortcutConflictControl.xaml" />
<None Remove="SettingsXAML\Controls\KeyVisual\KeyCharPresenter.xaml" />
</ItemGroup>
<ItemGroup>
<Page Remove="SettingsXAML\App.xaml" />
Expand Down Expand Up @@ -132,6 +135,15 @@
<None Update="Assets\Settings\Scripts\DisableModule.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Page Update="SettingsXAML\Controls\KeyVisual\KeyCharPresenter.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="SettingsXAML\Controls\Dashboard\ShortcutConflictControl.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="SettingsXAML\Controls\Dashboard\CheckUpdateControl.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>

<ItemGroup>
Expand Down
23 changes: 19 additions & 4 deletions src/settings-ui/Settings.UI/SettingsXAML/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
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">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<ResourceDictionary Source="/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml" />
<ResourceDictionary Source="/SettingsXAML/Controls/KeyVisual/KeyCharPresenter.xaml" />
<ResourceDictionary Source="/SettingsXAML/Styles/TextBlock.xaml" />
<ResourceDictionary Source="/SettingsXAML/Styles/Button.xaml" />
<ResourceDictionary Source="/SettingsXAML/Styles/InfoBadge.xaml" />
<ResourceDictionary Source="/SettingsXAML/Themes/Colors.xaml" />
<ResourceDictionary Source="/SettingsXAML/Themes/Generic.xaml" />

<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>

Expand All @@ -26,26 +29,36 @@
x:Key="BoolToVisibilityConverter"
FalseValue="Collapsed"
TrueValue="Visible" />

<tkconverters:BoolToObjectConverter
x:Key="BoolToComboBoxIndexConverter"
FalseValue="0"
TrueValue="1" />

<tkconverters:BoolToObjectConverter
x:Key="ReverseBoolToComboBoxIndexConverter"
FalseValue="1"
TrueValue="0" />

<tkconverters:DoubleToVisibilityConverter
x:Name="DoubleToVisibilityConverter"
FalseValue="Collapsed"
GreaterThan="0"
TrueValue="Visible" />
<tkconverters:DoubleToVisibilityConverter
x:Name="DoubleToInvertedVisibilityConverter"
FalseValue="Visible"
GreaterThan="0"
TrueValue="Collapsed" />
<tkconverters:StringFormatConverter x:Key="StringFormatConverter" />
<tkconverters:BoolNegationConverter x:Key="BoolNegationConverter" />
<converters:UpdateStateToBoolConverter x:Key="UpdateStateToBoolConverter" />

<x:Double x:Key="SettingsCardSpacing">2</x:Double>

<!-- Overrides -->
<Thickness x:Key="InfoBarIconMargin">6,16,16,16</Thickness>
<Thickness x:Key="InfoBarContentRootPadding">16,0,0,0</Thickness>
<x:Double x:Key="SettingActionControlMinWidth">240</x:Double>

<x:Double x:Key="PageMaxWidth">1000</x:Double>

<Style TargetType="ListViewItem">
<Setter Property="Margin" Value="0,0,0,2" />
Expand All @@ -55,14 +68,16 @@
</Style>

<Style BasedOn="{StaticResource DefaultCheckBoxStyle}" TargetType="controls:CheckBoxWithDescriptionControl" />
<!-- Other app resources here -->

<TransitionCollection x:Key="SettingsCardsAnimations">
<EntranceThemeTransition FromVerticalOffset="50" />
<!-- Animates cards when loaded -->
<RepositionThemeTransition IsStaggeringEnabled="False" />
<!-- Smoothly animates individual cards upon whenever Expanders are expanded/collapsed -->
</TransitionCollection>

<!-- Additional resources or settings can be added here -->

</ResourceDictionary>
</Application.Resources>
</Application>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8" ?>
<UserControl
x:Class="Microsoft.PowerToys.Settings.UI.Controls.Card"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Padding="8"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{StaticResource OverlayCornerRadius}"
mc:Ignorable="d">
<Grid
VerticalAlignment="{x:Bind VerticalContentAlignment, Mode=OneWay}"
Background="{x:Bind Background, Mode=OneWay}"
BorderBrush="{x:Bind BorderBrush, Mode=OneWay}"
BorderThickness="{x:Bind BorderThickness, Mode=OneWay}"
CornerRadius="{x:Bind CornerRadius, Mode=OneWay}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="44" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid x:Name="TitleGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Margin="16,0,0,0"
VerticalAlignment="Center"
FontSize="16"
FontWeight="SemiBold"
Text="{x:Bind Title, Mode=OneWay}" />
<ContentPresenter
Grid.Column="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Content="{x:Bind TitleContent, Mode=OneWay}" />
</Grid>
<Rectangle
x:Name="Divider"
Grid.Row="1"
Height="1"
HorizontalAlignment="Stretch"
Fill="{ThemeResource DividerStrokeColorDefaultBrush}"
Visibility="{x:Bind DividerVisibility, Mode=OneWay}" />

<ContentPresenter
Grid.Row="2"
Margin="{x:Bind Padding, Mode=OneWay}"
HorizontalAlignment="{x:Bind HorizontalContentAlignment, Mode=OneWay}"
VerticalAlignment="{x:Bind VerticalContentAlignment, Mode=OneWay}"
Content="{x:Bind Content, Mode=OneWay}" />
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="TitleGridVisibilityStates">
<VisualState x:Name="TitleGridVisible" />
<VisualState x:Name="TitleGridCollapsed">
<VisualState.Setters>
<Setter Target="TitleGrid.Visibility" Value="Collapsed" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// 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.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

namespace Microsoft.PowerToys.Settings.UI.Controls
{
public sealed partial class Card : UserControl
{
public static readonly DependencyProperty TitleContentProperty = DependencyProperty.Register(nameof(TitleContent), typeof(object), typeof(Card), new PropertyMetadata(defaultValue: null, OnVisualPropertyChanged));

public object TitleContent
{
get => (object)GetValue(TitleContentProperty);
set => SetValue(TitleContentProperty, value);
}

public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(nameof(Title), typeof(string), typeof(Card), new PropertyMetadata(defaultValue: null, OnVisualPropertyChanged));

public string Title
{
get => (string)GetValue(TitleProperty);
set => SetValue(TitleProperty, value);
}

public static new readonly DependencyProperty ContentProperty = DependencyProperty.Register(nameof(Content), typeof(object), typeof(Card), new PropertyMetadata(defaultValue: null));

[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1061:Do not hide base class methods", Justification = "We need to hide the base class method")]
public new object Content
{
get => (object)GetValue(ContentProperty);
set => SetValue(ContentProperty, value);
}

public static readonly DependencyProperty DividerVisibilityProperty = DependencyProperty.Register(nameof(DividerVisibility), typeof(Visibility), typeof(Card), new PropertyMetadata(defaultValue: null));

public Visibility DividerVisibility
{
get => (Visibility)GetValue(DividerVisibilityProperty);
set => SetValue(DividerVisibilityProperty, value);
}

public Card()
{
InitializeComponent();
SetVisualStates();
}

private static void OnVisualPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is Card card)
{
card.SetVisualStates();
}
}

private void SetVisualStates()
{
if (string.IsNullOrEmpty(Title) && TitleContent == null)
{
VisualStateManager.GoToState(this, "TitleGridCollapsed", true);
DividerVisibility = Visibility.Collapsed;
}
else
{
VisualStateManager.GoToState(this, "TitleGridVisible", true);
DividerVisibility = Visibility.Visible;
}
}
}
}
Comment thread
niels9001 marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8" ?>
<UserControl
x:Class="Microsoft.PowerToys.Settings.UI.Controls.CheckUpdateControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<StackPanel Orientation="Horizontal">
<Button
Click="SWVersionButtonClicked"
Style="{StaticResource SubtleButtonStyle}"
Visibility="{x:Bind UpdateAvailable, Mode=OneWay}">
<Grid ColumnSpacing="16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Width="20"
Height="20"
CornerRadius="10">
Comment thread
niels9001 marked this conversation as resolved.
Resolved
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0.5,1">
<GradientStop Offset="0.0" Color="#239DE0" />
<GradientStop Offset="1.0" Color="#037CD6" />
</LinearGradientBrush>
</Border.Background>
<FontIcon
AutomationProperties.AccessibilityView="Raw"
FontSize="11"
Comment thread
niels9001 marked this conversation as resolved.
Resolved
Foreground="White"
Glyph="&#xE895;" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated name for this icon is "Sync". There's also "SyncBadge12" &#xEDAB;.

</Border>
<StackPanel Grid.Column="1" Orientation="Vertical">
<TextBlock x:Uid="UpdateAvailableTextBlock" FontWeight="SemiBold" />
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Style="{StaticResource CaptionTextBlockStyle}">
<Run x:Uid="GeneralVersion" />
<Run Text="{x:Bind UpdateSettingsConfig.NewVersion, Mode=OneWay}" />
</TextBlock>
</StackPanel>
</Grid>
</Button>
<Grid
Padding="0,0,4,0"
VerticalAlignment="Center"
ColumnSpacing="16"
Visibility="{x:Bind UpdateAvailable, Converter={StaticResource ReverseBoolToVisibilityConverter}, Mode=OneWay}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Width="20"
Height="20"
CornerRadius="10">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0.5,1">
<GradientStop Offset="0.0" Color="#6FB538" />
<GradientStop Offset="1.0" Color="#397A24" />
</LinearGradientBrush>
</Border.Background>
<FontIcon
AutomationProperties.AccessibilityView="Raw"
FontSize="11"
Foreground="White"
Glyph="&#xE73E;" />
</Border>
<StackPanel Grid.Column="1" Orientation="Vertical">
<TextBlock x:Uid="YoureUpToDate" FontWeight="SemiBold" />
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Style="{StaticResource CaptionTextBlockStyle}">
<Run x:Uid="General_VersionLastChecked" />
<Run Text="{x:Bind UpdateSettingsConfig.LastCheckedDateLocalized, Mode=OneWay}" />
</TextBlock>
</StackPanel>
</Grid>
</StackPanel>
</UserControl>
Loading