mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
[Settings] New UX (#12470)
* Removed hardcoded background * Background * Updated pages * Added OOBE to shellpage * Margin fixes * Fix * Resource update * Resource string update * Removed reference from installer file * Updated UI fixes and remove conflicts * Adding new settings control * PowerRename * Sidepanel updates * Shortcut Guide * Updates screeens * General page updates * Awake UX update * Changed order for power preview note * Fixes * UI fixes * KBM * IsEnabled state support * Added new controls * Update * Updated nugest packages * Replaced itemscontrol * Introducing setting button style * FancyZones page * Plugin page * Switch case * Fixed typo * Plugin manager update * Introducing SettingExpander * Setting automation properties * Accesibility improvements * VCM and cleanup * Refactoring OOBE pages part 1 * OOBE XAML refactoring * Added MinWidth to actioncontent controls * Updates to various settings * Spell update * Update to author label * Clean up * Removing redunant files * Move file * Updated files * Revert "Updated files" This reverts commit1a5c887eae. * Revert "Move file" This reverts commit2b06c75c1f. * Revert "Removing redunant files" This reverts commitfe79ec1701. * Revert "Clean up" This reverts commit028e15fab6. * Removed redundant styles * Revert "Removed redundant styles" This reverts commitdfdfd65021. * Files cleanup * Removing converter, updating background and paddings * Styling updates * Unit test updates * Fixes * Installer fixes * Update Resources.resw * Shell page updates * Updated pagelinks * Styles re-ordering * Updated converter * Updated ToggleSwitch style * Bugfixes * Typo fix * [Settings] New UX - installer dll fixes (#12818) * [Settings] New UX - Fix some failing tests (#12822) * Bugfixes * Typo fix * Hiding VCM * Bugfixes * Download button fix * Remove Newtonsoft.Json from installer file * Updated visuals * Bugfixes * Syntax fix * Updated installer file * Bugfixes * New label * Theming support for OOBE * Put back in Documentation hyperlink * Right uid Co-authored-by: Niels Laute <niels9001@hotmail.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
@@ -5,109 +5,120 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:c="using:Microsoft.PowerToys.Settings.UI.Converters"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||
AutomationProperties.LandmarkType="Main">
|
||||
|
||||
<Page.Resources>
|
||||
<c:AwakeModeToBoolConverter x:Key="AwakeModeToBoolConverter" />
|
||||
</Page.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Uid="About_Awake"
|
||||
<controls:SettingsPageControl x:Uid="Awake" IsTabStop="False"
|
||||
ModuleImageSource="ms-appx:///Assets/Modules/Awake.png"
|
||||
ModuleImageLink="https://aka.ms/PowerToysOverview_Awake">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<ToggleSwitch x:Uid="Awake_EnableAwake" IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" />
|
||||
|
||||
<TextBlock x:Uid="Awake_Behavior_GroupSettings"
|
||||
Opacity="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"
|
||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
||||
<controls:Setting x:Uid="Awake_EnableAwake">
|
||||
<controls:Setting.Icon>
|
||||
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsAwake.png" ShowAsMonochrome="False" />
|
||||
</controls:Setting.Icon>
|
||||
<controls:Setting.ActionContent>
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" HorizontalAlignment="Right"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<CheckBox x:Uid="Awake_EnableDisplayKeepAwake"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
IsChecked="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}"
|
||||
Margin="{StaticResource XSmallTopMargin}" />
|
||||
<controls:SettingsGroup x:Uid="Awake_Behavior_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||
<controls:Setting x:Uid="Awake_EnableDisplayKeepAwake" Icon="">
|
||||
<controls:Setting.ActionContent>
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}" />
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<TextBlock x:Uid="Awake_Mode"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
x:Name="ModeTitleLabel"
|
||||
Opacity="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}" />
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="Awake_Mode"
|
||||
Icon=""
|
||||
Style="{StaticResource ExpanderHeaderSettingStyle}" />
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel Padding="56,16,16,24"
|
||||
Spacing="12">
|
||||
<RadioButton x:Uid="Awake_NoKeepAwake"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=0}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords"
|
||||
LineHeight="20">
|
||||
<Run x:Uid="Awake_NoKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
x:Uid="Awake_NoKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Awake_IndefiniteKeepAwake"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=1}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords"
|
||||
LineHeight="20">
|
||||
<Run x:Uid="Awake_IndefiniteKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
x:Uid="Awake_IndefiniteKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Awake_TemporaryKeepAwake"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=2}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords"
|
||||
LineHeight="20">
|
||||
<Run x:Uid="Awake_TemporaryKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
x:Uid="Awake_TemporaryKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=ModeTitleLabel}"
|
||||
Margin="0,-8,0,0">
|
||||
|
||||
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=ModeTitleLabel}"
|
||||
Margin="0,-8,0,0">
|
||||
<RadioButton x:Uid="Awake_NoKeepAwake"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=0}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
|
||||
<Run x:Uid="Awake_NoKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||
x:Uid="Awake_NoKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Awake_IndefiniteKeepAwake"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=1}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
|
||||
<Run x:Uid="Awake_IndefiniteKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||
x:Uid="Awake_IndefiniteKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Awake_TemporaryKeepAwake"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=2}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords" LineHeight="20">
|
||||
<Run x:Uid="Awake_TemporaryKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||
x:Uid="Awake_TemporaryKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
|
||||
<StackPanel Margin="28,8,0,0" Orientation="Horizontal">
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Hours"
|
||||
Value="{x:Bind ViewModel.Hours, Mode=TwoWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
MinWidth="90"
|
||||
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Minutes"
|
||||
Value="{x:Bind ViewModel.Minutes, Mode=TwoWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Margin="8,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
|
||||
MinWidth="90"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="28,8,0,0"
|
||||
Orientation="Horizontal">
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Hours"
|
||||
Value="{x:Bind ViewModel.Hours, Mode=TwoWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
MinWidth="90"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Minutes"
|
||||
Value="{x:Bind ViewModel.Minutes, Mode=TwoWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Margin="8,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
MinWidth="90"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
</controls:SettingsGroup>
|
||||
</StackPanel>
|
||||
</controls:SettingsPageControl.ModuleContent>
|
||||
|
||||
<controls:SettingsPageControl.ModuleLinks>
|
||||
<controls:SidePanelLink x:Uid="Learn_More" Link="https://aka.ms/PowerToysOverview_Awake"/>
|
||||
<controls:SidePanelLink x:Uid="Give_Feedback" Link="https://aka.ms/powerToysGiveFeedback"/>
|
||||
</controls:SettingsPageControl.ModuleLinks>
|
||||
<controls:SettingsPageControl.AttributionLinks>
|
||||
<controls:SidePanelLink Label="Den Delimarsky's Awake" Link="https://Awake.den.dev"/>
|
||||
</controls:SettingsPageControl.AttributionLinks>
|
||||
<controls:SettingsPageControl.PrimaryLinks>
|
||||
<controls:PageLink x:Uid="LearnMore_Awake" Link="https://aka.ms/PowerToysOverview_Awake"/>
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
<controls:SettingsPageControl.SecondaryLinks>
|
||||
<controls:PageLink Text="Den Delimarsky's Awake" Link="https://Awake.den.dev"/>
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user