mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-18 13:38:03 +08:00
[Settings] Settings UX enhancements (#12912)
* Update Colors.xaml * Added warning icon to Run plugin * Removed redundant name * Added border * Removed unused converter * Update GeneralPage.xaml Co-authored-by: Niels Laute <niels9001@hotmail.com>
This commit is contained in:
parent
e35568f63d
commit
da46b90457
@ -29,7 +29,7 @@
|
|||||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||||
<Setter Property="ManipulationMode" Value="System,TranslateX" />
|
<Setter Property="ManipulationMode" Value="System,TranslateX" />
|
||||||
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
|
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
|
||||||
<Setter Property="MinWidth" Value="{StaticResource ToggleSwitchThemeMinWidth}"/>
|
|
||||||
<Setter Property="FocusVisualMargin" Value="-7,-3,-7,-3" />
|
<Setter Property="FocusVisualMargin" Value="-7,-3,-7,-3" />
|
||||||
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="CardBackgroundFillColorDefaultBrush" />
|
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="CardBackgroundFillColorDefaultBrush" />
|
||||||
<StaticResource x:Key="CardBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
|
<StaticResource x:Key="CardBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
|
||||||
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="TextFillColorPrimaryBrush" />
|
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="TextFillColorPrimaryBrush" />
|
||||||
|
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="#FF34424d"/>
|
||||||
|
<Color x:Key="InfoBarInformationalSeverityIconBackground">#FF5fb2f2</Color>
|
||||||
<Thickness x:Key="CardBorderThickness">1</Thickness>
|
<Thickness x:Key="CardBorderThickness">1</Thickness>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
||||||
@ -14,6 +16,8 @@
|
|||||||
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="CardBackgroundFillColorDefaultBrush" />
|
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="CardBackgroundFillColorDefaultBrush" />
|
||||||
<StaticResource x:Key="CardBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
|
<StaticResource x:Key="CardBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
|
||||||
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="TextFillColorPrimaryBrush" />
|
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="TextFillColorPrimaryBrush" />
|
||||||
|
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="#FFd3e7f7"/>
|
||||||
|
<Color x:Key="InfoBarInformationalSeverityIconBackground">#FF0063b1</Color>
|
||||||
<Thickness x:Key="CardBorderThickness">1</Thickness>
|
<Thickness x:Key="CardBorderThickness">1</Thickness>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
||||||
@ -21,6 +25,8 @@
|
|||||||
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="SystemColorButtonFaceColorBrush" />
|
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="SystemColorButtonFaceColorBrush" />
|
||||||
<StaticResource x:Key="CardBorderBrush" ResourceKey="SystemColorButtonTextColorBrush" />
|
<StaticResource x:Key="CardBorderBrush" ResourceKey="SystemColorButtonTextColorBrush" />
|
||||||
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="SystemColorButtonTextColorBrush" />
|
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="SystemColorButtonTextColorBrush" />
|
||||||
|
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="#FF34424d"/>
|
||||||
|
<Color x:Key="InfoBarInformationalSeverityIconBackground">#FF5fb2f2</Color>
|
||||||
<Thickness x:Key="CardBorderThickness">2</Thickness>
|
<Thickness x:Key="CardBorderThickness">2</Thickness>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
<!-- New version available -->
|
<!-- New version available -->
|
||||||
<muxc:InfoBar x:Uid="General_NewVersionAvailable"
|
<muxc:InfoBar x:Uid="General_NewVersionAvailable"
|
||||||
IsClosable="False"
|
IsClosable="False"
|
||||||
Severity="Success"
|
Severity="Informational"
|
||||||
IsOpen="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToDownload}"
|
IsOpen="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToDownload}"
|
||||||
Message="{Binding PowerToysNewAvailableVersion, Mode=OneWay}">
|
Message="{Binding PowerToysNewAvailableVersion, Mode=OneWay}">
|
||||||
<muxc:InfoBar.Content>
|
<muxc:InfoBar.Content>
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
<Page.Resources>
|
<Page.Resources>
|
||||||
<local:VisibleIfNotEmpty x:Key="visibleIfNotEmptyConverter" />
|
<local:VisibleIfNotEmpty x:Key="visibleIfNotEmptyConverter" />
|
||||||
|
|
||||||
<Style TargetType="ListViewItem" x:Name="KeysListViewContainerStyle">
|
<Style TargetType="ListViewItem" x:Name="KeysListViewContainerStyle">
|
||||||
<Setter Property="IsTabStop" Value="False"/>
|
<Setter Property="IsTabStop" Value="False"/>
|
||||||
</Style>
|
</Style>
|
||||||
@ -122,7 +123,7 @@
|
|||||||
IsTabStop="False">
|
IsTabStop="False">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Orientation="Horizontal"/>
|
<StackPanel Orientation="Horizontal" Spacing="4"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
@ -138,7 +139,7 @@
|
|||||||
IsTabStop="False">
|
IsTabStop="False">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Orientation="Horizontal"/>
|
<StackPanel Orientation="Horizontal" Spacing="4"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
@ -201,9 +202,21 @@
|
|||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
<TextBlock Margin="8,0,0,0" Style="{StaticResource SecondaryTextStyle}" VerticalAlignment="Center">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Run Text="{x:Bind TargetApp}" FontWeight="SemiBold"/>
|
<Border VerticalAlignment="Center"
|
||||||
</TextBlock>
|
Padding="12,4,12,6"
|
||||||
|
Margin="16,0,0,0"
|
||||||
|
CornerRadius="12">
|
||||||
|
<Border.Background>
|
||||||
|
<SolidColorBrush Color="{ThemeResource SystemAccentColorLight3}"
|
||||||
|
Opacity="0.3"/>
|
||||||
|
</Border.Background>
|
||||||
|
<TextBlock Text="{x:Bind TargetApp}"
|
||||||
|
Foreground="{ThemeResource SystemAccentColorDark1}"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
FontSize="12" />
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
|
@ -197,8 +197,30 @@
|
|||||||
Height="20" />
|
Height="20" />
|
||||||
</controls:Setting.Icon>
|
</controls:Setting.Icon>
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="16">
|
||||||
|
<!-- To do: replace with InfoBadge once we move towards WinUI 2.7 -->
|
||||||
|
<Grid VerticalAlignment="Center"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
|
Visibility="{x:Bind ShowNotAccessibleWarning}">
|
||||||
|
<TextBlock x:Name="IconBackground"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="{StaticResource InfoBarIconFontSize}"
|
||||||
|
Text="{StaticResource InfoBarIconBackgroundGlyph}"
|
||||||
|
Foreground="{ThemeResource InfoBarErrorSeverityIconBackground}"
|
||||||
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
|
AutomationProperties.AccessibilityView="Raw" />
|
||||||
|
|
||||||
|
<TextBlock x:Name="StandardIcon"
|
||||||
|
FontSize="{StaticResource InfoBarIconFontSize}"
|
||||||
|
Text="{StaticResource InfoBarErrorIconGlyph}"
|
||||||
|
Foreground="{ThemeResource InfoBarErrorSeverityIconForeground}"
|
||||||
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<ToggleSwitch x:Uid="PowerLauncher_EnablePluginToggle"
|
<ToggleSwitch x:Uid="PowerLauncher_EnablePluginToggle"
|
||||||
IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}"/>
|
IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</controls:Setting.ActionContent>
|
</controls:Setting.ActionContent>
|
||||||
</controls:Setting>
|
</controls:Setting>
|
||||||
</controls:SettingExpander.Header>
|
</controls:SettingExpander.Header>
|
||||||
@ -206,12 +228,17 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<controls:Setting x:Uid="PowerLauncher_ActionKeyword" Style="{StaticResource ExpanderContentSettingStyle}" IsEnabled="{x:Bind Enabled, Mode=OneWay}">
|
<controls:Setting x:Uid="PowerLauncher_ActionKeyword" Style="{StaticResource ExpanderContentSettingStyle}" IsEnabled="{x:Bind Enabled, Mode=OneWay}">
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<TextBox Text="{x:Bind Path=ActionKeyword, Mode=TwoWay}"
|
<TextBox Text="{x:Bind Path=ActionKeyword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}" />
|
MinWidth="{StaticResource SettingActionControlMinWidth}" />
|
||||||
</controls:Setting.ActionContent>
|
</controls:Setting.ActionContent>
|
||||||
</controls:Setting>
|
</controls:Setting>
|
||||||
<muxc:InfoBar Severity="Warning" x:Uid="Run_NotAccessibleWarning" IsOpen="{x:Bind ShowNotAccessibleWarning}" IsClosable="False" />
|
<muxc:InfoBar Severity="Error" x:Uid="Run_NotAccessibleWarning"
|
||||||
<muxc:InfoBar Severity="Error" x:Uid="Run_NotAllowedActionKeyword" IsOpen="{x:Bind ShowNotAllowedKeywordWarning}" IsClosable="False" />
|
IsOpen="{x:Bind ShowNotAccessibleWarning}"
|
||||||
|
IsClosable="False" />
|
||||||
|
<muxc:InfoBar Severity="Error"
|
||||||
|
x:Uid="Run_NotAllowedActionKeyword"
|
||||||
|
IsOpen="{x:Bind ShowNotAllowedKeywordWarning}"
|
||||||
|
IsClosable="False" />
|
||||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||||
<CheckBox x:Uid="PowerLauncher_IncludeInGlobalResult"
|
<CheckBox x:Uid="PowerLauncher_IncludeInGlobalResult"
|
||||||
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}"
|
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}"
|
||||||
|
Loading…
Reference in New Issue
Block a user