From 536c723599e09637bddddaec2a1e0d148b07068e Mon Sep 17 00:00:00 2001 From: Davide Giacometti Date: Tue, 24 Oct 2023 12:25:55 +0200 Subject: [PATCH] [Settings]XamlStyler formatting (#29114) * XamlStyler formatting * add generated files exclusion --- .pipelines/applyXamlStyling.ps1 | 2 +- .../Controls/FancyZonesPreviewControl.xaml | 58 +- .../IsEnabledTextBlock.xaml | 3 +- .../Controls/KeyVisual/KeyVisual.xaml | 40 +- .../Controls/PowerAccentShortcutControl.xaml | 4 +- .../SettingsPageControl.xaml | 40 +- .../ShortcutDialogContentControl.xaml | 22 +- .../SettingsXAML/Flyout/AppsListPage.xaml | 10 +- .../SettingsXAML/FlyoutWindow.xaml | 18 +- .../Settings.UI/SettingsXAML/MainWindow.xaml | 4 +- .../OOBE/Views/OobeAlwaysOnTop.xaml | 32 +- .../SettingsXAML/OOBE/Views/OobeAwake.xaml | 32 +- .../OOBE/Views/OobeColorPicker.xaml | 32 +- .../OOBE/Views/OobeCropAndLock.xaml | 28 +- .../OOBE/Views/OobeFancyZones.xaml | 38 +- .../OOBE/Views/OobeFileExplorer.xaml | 24 +- .../OOBE/Views/OobeFileLocksmith.xaml | 32 +- .../SettingsXAML/OOBE/Views/OobeHosts.xaml | 16 +- .../OOBE/Views/OobeImageResizer.xaml | 32 +- .../SettingsXAML/OOBE/Views/OobeKBM.xaml | 32 +- .../OOBE/Views/OobeMeasureTool.xaml | 28 +- .../OOBE/Views/OobeMouseUtils.xaml | 48 +- .../OOBE/Views/OobeMouseWithoutBorders.xaml | 32 +- .../SettingsXAML/OOBE/Views/OobeOverview.xaml | 20 +- .../OOBE/Views/OobeOverviewPlaceholder.xaml | 20 +- .../OOBE/Views/OobePastePlain.xaml | 24 +- .../SettingsXAML/OOBE/Views/OobePeek.xaml | 34 +- .../OOBE/Views/OobePowerAccent.xaml | 24 +- .../SettingsXAML/OOBE/Views/OobePowerOCR.xaml | 32 +- .../OOBE/Views/OobePowerRename.xaml | 32 +- .../OOBE/Views/OobeRegistryPreview.xaml | 32 +- .../SettingsXAML/OOBE/Views/OobeRun.xaml | 32 +- .../OOBE/Views/OobeShortcutGuide.xaml | 24 +- .../OOBE/Views/OobeVideoConference.xaml | 40 +- .../SettingsXAML/OOBE/Views/OobeWhatsNew.xaml | 8 +- .../SettingsXAML/Styles/Button.xaml | 894 +++++++++--------- .../SettingsXAML/Styles/TextBlock.xaml | 12 +- .../SettingsXAML/Themes/Colors.xaml | 28 +- .../SettingsXAML/Views/ColorPickerPage.xaml | 6 +- .../SettingsXAML/Views/FancyZonesPage.xaml | 6 +- .../SettingsXAML/Views/PowerLauncherPage.xaml | 7 +- 41 files changed, 720 insertions(+), 1162 deletions(-) diff --git a/.pipelines/applyXamlStyling.ps1 b/.pipelines/applyXamlStyling.ps1 index 42e235f195..8f890d2a91 100644 --- a/.pipelines/applyXamlStyling.ps1 +++ b/.pipelines/applyXamlStyling.ps1 @@ -107,7 +107,7 @@ if (-not $Passive) else { Write-Output "Checking all files (passively)" - $files = Get-ChildItem -Path "$PSScriptRoot\..\src\*.xaml" -Recurse | Select-Object -ExpandProperty FullName | Where-Object { $_ -notmatch "(\\obj\\)|(\\bin\\)|(\\x64\\)|(\\launcher\\PowerLauncher\\)|(\\launcher\\Wox.Plugin\\)|(\\colorPicker\\ColorPickerUI\\)|(\\settings-ui\\Settings.UI\\)" } + $files = Get-ChildItem -Path "$PSScriptRoot\..\src\*.xaml" -Recurse | Select-Object -ExpandProperty FullName | Where-Object { $_ -notmatch "(\\obj\\)|(\\bin\\)|(\\x64\\)|(\\Generated Files\\PowerRenameXAML\\)|(\\launcher\\PowerLauncher\\)|(\\launcher\\Wox.Plugin\\)|(\\colorPicker\\ColorPickerUI\\)" } if ($files.count -gt 0) { diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml index 36cd66e38a..ebb8e7eff5 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/FancyZonesPreviewControl.xaml @@ -11,39 +11,23 @@ - - + + - - + + - - + + - - + + - + + CornerRadius="4" + Opacity="0.8"> @@ -75,10 +59,10 @@ + Background="{ThemeResource SystemControlAcrylicElementBrush}" + BorderThickness="1" + CornerRadius="2"> + Background="{ThemeResource SystemControlAcrylicElementBrush}" + BorderThickness="1" + CornerRadius="2"> + Background="{ThemeResource SystemControlAcrylicElementBrush}" + BorderThickness="1" + CornerRadius="2"> diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml index 68590a040a..469a8be795 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/KeyVisual/KeyVisual.xaml @@ -21,6 +21,26 @@ + + + + @@ -45,26 +65,6 @@ - - - - diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml index 0d44308c24..428663359b 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/PowerAccentShortcutControl.xaml @@ -22,9 +22,7 @@ ItemsSource="{x:Bind Keys}"> - + 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 87b182b414..644fccc5e2 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/SettingsPageControl/SettingsPageControl.xaml @@ -2,8 +2,8 @@ x:Class="Microsoft.PowerToys.Settings.UI.Controls.SettingsPageControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:custom="using:CommunityToolkit.WinUI.UI.Controls" xmlns:converters="using:CommunityToolkit.WinUI.Converters" + xmlns:custom="using:CommunityToolkit.WinUI.UI.Controls" 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" @@ -24,25 +24,6 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + 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 9472c661cc..899f08f746 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/ShortcutControl/ShortcutDialogContentControl.xaml @@ -8,17 +8,14 @@ xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" x:Name="ShortcutContentControl" mc:Ignorable="d"> - + - + - + @@ -57,11 +52,12 @@ Spacing="8"> - + + @@ -71,8 +71,8 @@ + Margin="0,0,16,0" + VerticalAlignment="Center"> @@ -86,9 +86,9 @@ diff --git a/src/settings-ui/Settings.UI/SettingsXAML/FlyoutWindow.xaml b/src/settings-ui/Settings.UI/SettingsXAML/FlyoutWindow.xaml index 8ecffb7013..7f9b221bcf 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/FlyoutWindow.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/FlyoutWindow.xaml @@ -1,14 +1,14 @@ - - - + + - - + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml b/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml index 54c2997ed3..88341fcc8b 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml @@ -1,4 +1,4 @@ - - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeAlwaysOnTop.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeAlwaysOnTop.xaml index 10abf7774a..ac731446d8 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeAlwaysOnTop.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeAlwaysOnTop.xaml @@ -9,40 +9,24 @@ xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls" mc:Ignorable="d"> - + - + - + - + - + -