Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Settings] Settings UX enhancements #12912

Merged
merged 6 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="ManipulationMode" Value="System,TranslateX" />
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
<Setter Property="MinWidth" Value="{StaticResource ToggleSwitchThemeMinWidth}"/>

<Setter Property="FocusVisualMargin" Value="-7,-3,-7,-3" />

<Setter Property="Template">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,26 @@
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="CardBackgroundFillColorDefaultBrush" />
<StaticResource x:Key="CardBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="TextFillColorPrimaryBrush" />
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="#FF34424d"/>
<Color x:Key="InfoBarInformationalSeverityIconBackground">#FF5fb2f2</Color>
<Thickness x:Key="CardBorderThickness">1</Thickness>
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="CardBackgroundFillColorDefaultBrush" />
<StaticResource x:Key="CardBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="CardPrimaryForegroundBrush" ResourceKey="TextFillColorPrimaryBrush" />
<SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="#FFd3e7f7"/>
<Color x:Key="InfoBarInformationalSeverityIconBackground">#FF0063b1</Color>
<Thickness x:Key="CardBorderThickness">1</Thickness>
</ResourceDictionary>

<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="CardBackgroundBrush" ResourceKey="SystemColorButtonFaceColorBrush" />
<StaticResource x:Key="CardBorderBrush" 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>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<!-- New version available -->
<muxc:InfoBar x:Uid="General_NewVersionAvailable"
IsClosable="False"
Severity="Success"
Severity="Informational"
IsOpen="{Binding PowerToysUpdatingState, Mode=OneWay, Converter={StaticResource UpdateStateToBoolConverter}, ConverterParameter=ReadyToDownload}"
Message="{Binding PowerToysNewAvailableVersion, Mode=OneWay}">
<muxc:InfoBar.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<Page.Resources>
<local:VisibleIfNotEmpty x:Key="visibleIfNotEmptyConverter" />

<Style TargetType="ListViewItem" x:Name="KeysListViewContainerStyle">
<Setter Property="IsTabStop" Value="False"/>
</Style>
Expand Down Expand Up @@ -122,7 +123,7 @@
IsTabStop="False">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
<StackPanel Orientation="Horizontal" Spacing="4"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
Expand All @@ -138,7 +139,7 @@
IsTabStop="False">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
<StackPanel Orientation="Horizontal" Spacing="4"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
Expand Down Expand Up @@ -201,9 +202,21 @@
</ItemsControl.ItemsPanel>
</ItemsControl>

<TextBlock Margin="8,0,0,0" Style="{StaticResource SecondaryTextStyle}" VerticalAlignment="Center">
<Run Text="{x:Bind TargetApp}" FontWeight="SemiBold"/>
</TextBlock>
<StackPanel Orientation="Horizontal">
<Border VerticalAlignment="Center"
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>
</DataTemplate>
</ListView.ItemTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,48 @@
Height="20" />
</controls:Setting.Icon>
<controls:Setting.ActionContent>
<ToggleSwitch x:Uid="PowerLauncher_EnablePluginToggle"
IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}"/>
<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"
IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}"/>
</StackPanel>

</controls:Setting.ActionContent>
</controls:Setting>
</controls:SettingExpander.Header>
<controls:SettingExpander.Content>
<StackPanel>
<controls:Setting x:Uid="PowerLauncher_ActionKeyword" Style="{StaticResource ExpanderContentSettingStyle}" IsEnabled="{x:Bind Enabled, Mode=OneWay}">
<controls:Setting.ActionContent>
<TextBox Text="{x:Bind Path=ActionKeyword, Mode=TwoWay}"
<TextBox Text="{x:Bind Path=ActionKeyword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
MinWidth="{StaticResource SettingActionControlMinWidth}" />
</controls:Setting.ActionContent>
</controls:Setting>
<muxc:InfoBar Severity="Warning" x:Uid="Run_NotAccessibleWarning" IsOpen="{x:Bind ShowNotAccessibleWarning}" IsClosable="False" />
<muxc:InfoBar Severity="Error" x:Uid="Run_NotAllowedActionKeyword" IsOpen="{x:Bind ShowNotAllowedKeywordWarning}" IsClosable="False" />
<muxc:InfoBar Severity="Error" x:Uid="Run_NotAccessibleWarning"
IsOpen="{x:Bind ShowNotAccessibleWarning}"
IsClosable="False" />
<muxc:InfoBar Severity="Error"
x:Uid="Run_NotAllowedActionKeyword"
IsOpen="{x:Bind ShowNotAllowedKeywordWarning}"
IsClosable="False" />
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
<CheckBox x:Uid="PowerLauncher_IncludeInGlobalResult"
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}"
Expand Down