mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[Settings]XamlStyler formatting (#29114)
* XamlStyler formatting * add generated files exclusion
This commit is contained in:
committed by
GitHub
parent
8eb48676f2
commit
536c723599
@@ -11,39 +11,23 @@
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<SolidColorBrush
|
||||
x:Key="SolidBackgroundBrush"
|
||||
Color="Black" />
|
||||
<SolidColorBrush
|
||||
x:Key="SolidZoneNumberBrush"
|
||||
Color="White" />
|
||||
<SolidColorBrush x:Key="SolidBackgroundBrush" Color="Black" />
|
||||
<SolidColorBrush x:Key="SolidZoneNumberBrush" Color="White" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<SolidColorBrush
|
||||
x:Key="SolidBackgroundBrush"
|
||||
Color="White" />
|
||||
<SolidColorBrush
|
||||
x:Key="SolidZoneNumberBrush"
|
||||
Color="Black" />
|
||||
<SolidColorBrush x:Key="SolidBackgroundBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="SolidZoneNumberBrush" Color="Black" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
<SolidColorBrush
|
||||
x:Key="SolidBackgroundBrush"
|
||||
Color="Black" />
|
||||
<SolidColorBrush
|
||||
x:Key="SolidZoneNumberBrush"
|
||||
Color="White" />
|
||||
<SolidColorBrush x:Key="SolidBackgroundBrush" Color="Black" />
|
||||
<SolidColorBrush x:Key="SolidZoneNumberBrush" Color="White" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<SolidColorBrush
|
||||
x:Key="DefaultAccentBrush"
|
||||
Color="{ThemeResource SystemAccentColor}" />
|
||||
<SolidColorBrush
|
||||
x:Key="DefaultBorderBrush"
|
||||
Color="{ThemeResource SystemAccentColor}" />
|
||||
<SolidColorBrush x:Key="DefaultAccentBrush" Color="{ThemeResource SystemAccentColor}" />
|
||||
<SolidColorBrush x:Key="DefaultBorderBrush" Color="{ThemeResource SystemAccentColor}" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
|
||||
<Grid
|
||||
x:Name="RootGrid"
|
||||
MinWidth="170"
|
||||
@@ -64,10 +48,10 @@
|
||||
<Border
|
||||
Grid.RowSpan="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Opacity="0.8"
|
||||
CornerRadius="4">
|
||||
CornerRadius="4"
|
||||
Opacity="0.8">
|
||||
<Image
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Source="{x:Bind WallpaperPath, Mode=OneWay}"
|
||||
Stretch="UniformToFill" />
|
||||
</Border>
|
||||
@@ -75,10 +59,10 @@
|
||||
<Border
|
||||
x:Name="Zone1"
|
||||
Grid.RowSpan="2"
|
||||
BorderThickness="1"
|
||||
Margin="4,4,2,4"
|
||||
CornerRadius="2"
|
||||
Background="{ThemeResource SystemControlAcrylicElementBrush}">
|
||||
Background="{ThemeResource SystemControlAcrylicElementBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2">
|
||||
<TextBlock
|
||||
x:Name="Zone1Number"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -90,10 +74,10 @@
|
||||
<Border
|
||||
x:Name="Zone2"
|
||||
Grid.Column="1"
|
||||
BorderThickness="1"
|
||||
Margin="2,4,4,2"
|
||||
CornerRadius="2"
|
||||
Background="{ThemeResource SystemControlAcrylicElementBrush}">
|
||||
Background="{ThemeResource SystemControlAcrylicElementBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2">
|
||||
<TextBlock
|
||||
x:Name="Zone2Number"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -106,10 +90,10 @@
|
||||
x:Name="Zone3"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
BorderThickness="1"
|
||||
Margin="2,2,4,4"
|
||||
CornerRadius="2"
|
||||
Background="{ThemeResource SystemControlAcrylicElementBrush}">
|
||||
Background="{ThemeResource SystemControlAcrylicElementBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2">
|
||||
<TextBlock
|
||||
x:Name="Zone3Number"
|
||||
HorizontalAlignment="Center"
|
||||
|
||||
@@ -35,9 +35,8 @@
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="SecondaryIsEnabledTextBlockStyle"
|
||||
TargetType="local:IsEnabledTextBlock"
|
||||
BasedOn="{StaticResource DefaultIsEnabledTextBlockStyle}"
|
||||
>
|
||||
TargetType="local:IsEnabledTextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource SecondaryTextFontSize}" />
|
||||
</Style>
|
||||
|
||||
@@ -21,6 +21,26 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="local:KeyVisual">
|
||||
<Grid>
|
||||
<Grid>
|
||||
<Rectangle
|
||||
x:Name="ContentHolder"
|
||||
Height="{TemplateBinding Height}"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
Fill="{TemplateBinding Background}"
|
||||
RadiusX="4"
|
||||
RadiusY="4"
|
||||
Stroke="{TemplateBinding BorderBrush}"
|
||||
StrokeThickness="{TemplateBinding BorderThickness}" />
|
||||
<ContentPresenter
|
||||
x:Name="KeyPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Content}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Grid>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
@@ -45,26 +65,6 @@
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Grid>
|
||||
<Rectangle
|
||||
x:Name="ContentHolder"
|
||||
Height="{TemplateBinding Height}"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
Fill="{TemplateBinding Background}"
|
||||
RadiusX="4"
|
||||
RadiusY="4"
|
||||
Stroke="{TemplateBinding BorderBrush}"
|
||||
StrokeThickness="{TemplateBinding BorderThickness}" />
|
||||
<ContentPresenter
|
||||
x:Name="KeyPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Content}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
ItemsSource="{x:Bind Keys}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
Spacing="4" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="4" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
|
||||
@@ -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 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup>
|
||||
<VisualState>
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="480" />
|
||||
</VisualState.StateTriggers>
|
||||
</VisualState>
|
||||
<VisualState>
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="0" />
|
||||
</VisualState.StateTriggers>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="DescriptionPanel.(Grid.Row)" Value="1" />
|
||||
<Setter Target="DescriptionPanel.(Grid.Column)" Value="0" />
|
||||
<Setter Target="DescriptionPanel.(Grid.ColumnSpan)" Value="2" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<TextBlock
|
||||
x:Name="Header"
|
||||
MaxWidth="{StaticResource PageMaxWidth}"
|
||||
@@ -157,5 +138,24 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup>
|
||||
<VisualState>
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="480" />
|
||||
</VisualState.StateTriggers>
|
||||
</VisualState>
|
||||
<VisualState>
|
||||
<VisualState.StateTriggers>
|
||||
<AdaptiveTrigger MinWindowWidth="0" />
|
||||
</VisualState.StateTriggers>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="DescriptionPanel.(Grid.Row)" Value="1" />
|
||||
<Setter Target="DescriptionPanel.(Grid.Column)" Value="0" />
|
||||
<Setter Target="DescriptionPanel.(Grid.ColumnSpan)" Value="2" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -8,17 +8,14 @@
|
||||
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls"
|
||||
x:Name="ShortcutContentControl"
|
||||
mc:Ignorable="d">
|
||||
<Grid
|
||||
MinWidth="498"
|
||||
MinHeight="220">
|
||||
<Grid MinWidth="498" MinHeight="220">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition MinHeight="110" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0" />
|
||||
<TextBlock Grid.Row="0" />
|
||||
|
||||
<ItemsControl
|
||||
x:Name="KeysControl"
|
||||
@@ -31,9 +28,7 @@
|
||||
ItemsSource="{x:Bind Keys, Mode=OneWay}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
Spacing="8" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="8" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
@@ -57,11 +52,12 @@
|
||||
Spacing="8">
|
||||
<Grid Height="62">
|
||||
|
||||
<InfoBar x:Uid="InvalidShortcut"
|
||||
IsClosable="False"
|
||||
IsOpen="{Binding ElementName=ShortcutContentControl, Path=IsError, Mode=OneWay}"
|
||||
IsTabStop="{Binding ElementName=ShortcutContentControl, Path=IsError, Mode=OneWay}"
|
||||
Severity="Error" />
|
||||
<InfoBar
|
||||
x:Uid="InvalidShortcut"
|
||||
IsClosable="False"
|
||||
IsOpen="{Binding ElementName=ShortcutContentControl, Path=IsError, Mode=OneWay}"
|
||||
IsTabStop="{Binding ElementName=ShortcutContentControl, Path=IsError, Mode=OneWay}"
|
||||
Severity="Error" />
|
||||
|
||||
</Grid>
|
||||
<toolkitcontrols:MarkdownTextBlock
|
||||
|
||||
Reference in New Issue
Block a user