[Settings]Minor UI tweaks on update options (#31141)

* XAML tweaks

* XAML styling

* Remove border around infobar
This commit is contained in:
Niels Laute
2024-01-26 18:02:30 +01:00
committed by GitHub
parent ae8338457c
commit a123b5c939
2 changed files with 140 additions and 151 deletions

View File

@@ -1,4 +1,4 @@
<Page
<Page
x:Class="Microsoft.PowerToys.Settings.UI.Views.GeneralPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -20,8 +20,8 @@
<controls:SettingsPageControl.ModuleContent>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" Orientation="Vertical">
<controls:SettingsGroup x:Uid="General_VersionAndUpdate" Margin="0,-32,0,0">
<tkcontrols:SettingsCard Header="{x:Bind ViewModel.PowerToysVersion, Mode=OneWay}" HeaderIcon="{ui:FontIcon Glyph=&#xE895;}">
<tkcontrols:SettingsCard.Description>
<tkcontrols:SettingsExpander Header="{x:Bind ViewModel.PowerToysVersion, Mode=OneWay}" HeaderIcon="{ui:FontIcon Glyph=&#xE895;}">
<tkcontrols:SettingsExpander.Description>
<StackPanel Orientation="Vertical">
<TextBlock Style="{StaticResource SecondaryTextStyle}">
<Run x:Uid="General_VersionLastChecked" />
@@ -33,7 +33,7 @@
FontWeight="SemiBold"
NavigateUri="https://github.com/microsoft/PowerToys/releases/" />
</StackPanel>
</tkcontrols:SettingsCard.Description>
</tkcontrols:SettingsExpander.Description>
<Grid Visibility="{x:Bind ViewModel.IsUpdatePanelVisible, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
<StackPanel
VerticalAlignment="Center"
@@ -55,7 +55,33 @@
IsEnabled="{Binding IsDownloadAllowed}"
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource BoolNegationConverter}}" />
</Grid>
<tkcontrols:SettingsExpander.ItemsHeader>
<InfoBar
x:Uid="GPO_SomeSettingsAreManaged"
BorderThickness="0"
CornerRadius="0"
IsClosable="False"
IsOpen="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
Severity="Informational" />
</tkcontrols:SettingsExpander.ItemsHeader>
<tkcontrols:SettingsExpander.Items>
<tkcontrols:SettingsCard
ContentAlignment="Left"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAutoDownloadUpdatesCardEnabled}"
Visibility="{x:Bind ViewModel.IsAdmin, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralPage_AutoDownloadAndInstallUpdates" IsChecked="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsShowNewUpdatesToastNotificationCardEnabled}">
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralPage_ShowNewUpdatesToast" IsChecked="{Binding Mode=TwoWay, Path=ShowNewUpdatesToastNotification}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsShowWhatsNewAfterUpdatesCardEnabled}">
<CheckBox x:Uid="GeneralPage_ShowWhatsNewAfterUpdates" IsChecked="{Binding Mode=TwoWay, Path=ShowWhatsNewAfterUpdates}" />
</tkcontrols:SettingsCard>
</tkcontrols:SettingsExpander.Items>
</tkcontrols:SettingsExpander>
<StackPanel Orientation="Vertical">
<InfoBar
x:Uid="General_UpToDate"
IsClosable="False"
@@ -174,35 +200,7 @@
Style="{StaticResource TextButtonStyle}" />
</InfoBar.ActionButton>
</InfoBar>
<tkcontrols:SettingsExpander
x:Uid="General_UpdateSettings"
Margin="0,-6,0,0"
HeaderIcon="{ui:FontIcon Glyph=&#xE713;}"
IsExpanded="True">
<tkcontrols:SettingsExpander.ItemsHeader>
<InfoBar
x:Uid="GPO_SomeSettingsAreManaged"
IsClosable="False"
IsOpen="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.SomeUpdateSettingsAreGpoManaged, Mode=OneWay}"
Severity="Informational" />
</tkcontrols:SettingsExpander.ItemsHeader>
<tkcontrols:SettingsExpander.Items>
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsShowNewUpdatesToastNotificationCardEnabled}">
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralPage_ShowNewUpdatesToast" IsChecked="{Binding Mode=TwoWay, Path=ShowNewUpdatesToastNotification}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard
ContentAlignment="Left"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsAutoDownloadUpdatesCardEnabled}"
Visibility="{x:Bind ViewModel.IsAdmin, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralPage_AutoDownloadAndInstallUpdates" IsChecked="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsShowWhatsNewAfterUpdatesCardEnabled}">
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralPage_ShowWhatsNewAfterUpdates" IsChecked="{Binding Mode=TwoWay, Path=ShowWhatsNewAfterUpdates}" />
</tkcontrols:SettingsCard>
</tkcontrols:SettingsExpander.Items>
</tkcontrols:SettingsExpander>
</StackPanel>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="Admin_Mode">
@@ -219,14 +217,14 @@
Command="{Binding RestartElevatedButtonEventHandler}"
IsEnabled="{Binding IsAdminButtonEnabled}" />
<tkcontrols:SettingsExpander.Items>
<tkcontrols:SettingsCard x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{x:Bind ViewModel.IsElevated, Mode=OneWay}">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.RunElevated, Mode=TwoWay}" />
<tkcontrols:SettingsCard ContentAlignment="Left" IsEnabled="{x:Bind ViewModel.IsElevated, Mode=OneWay}">
<controls:CheckBoxWithDescriptionControl x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsChecked="{x:Bind ViewModel.RunElevated, Mode=TwoWay}" />
</tkcontrols:SettingsCard>
<tkcontrols:SettingsCard ContentAlignment="Left">
<CheckBox x:Uid="GeneralPage_WarningsElevatedApps" IsChecked="{Binding Mode=TwoWay, Path=EnableWarningsElevatedApps}" />
</tkcontrols:SettingsCard>
</tkcontrols:SettingsExpander.Items>
</tkcontrols:SettingsExpander>
<tkcontrols:SettingsCard x:Uid="GeneralPage_WarningsElevatedApps">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=EnableWarningsElevatedApps}" />
</tkcontrols:SettingsCard>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="Appearance_Behavior" IsEnabled="True">

View File

@@ -1022,11 +1022,8 @@
<data name="GeneralPage_RunAtStartUp.Description" xml:space="preserve">
<value>PowerToys will launch automatically</value>
</data>
<data name="GeneralPage_WarningsElevatedApps.Header" xml:space="preserve">
<value>Elevated Apps warnings </value>
</data>
<data name="GeneralPage_WarningsElevatedApps.Description" xml:space="preserve">
<value>Show notifications about PowerToys functionality issues when running alongside elevated applications.</value>
<data name="GeneralPage_WarningsElevatedApps.Content" xml:space="preserve">
<value>Show a warning for functionality issues when running alongside elevated applications</value>
</data>
<data name="PowerRename.ModuleDescription" xml:space="preserve">
<value>A Windows Shell extension for more advanced bulk renaming using search &amp; replace or regular expressions.</value>
@@ -4002,8 +3999,8 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="PowerLauncher_TextFontSizeSlider.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Text size of result titles</value>
</data>
<data name="GeneralPage_ShowWhatsNewAfterUpdates.Header" xml:space="preserve">
<value>Show the release notes after updates</value>
<data name="GeneralPage_ShowWhatsNewAfterUpdates.Content" xml:space="preserve">
<value>Show the release notes after an update</value>
</data>
<data name="CmdNotFound_Arm64ArchBar.Title" xml:space="preserve">
<value>Command Not Found is not supported on the ARM64 architecture currently. We are actively working on a solution.</value>
@@ -4012,15 +4009,9 @@ Activate by holding the key for the character you want to add an accent to, then
<value>Do not activate when Game Mode is on</value>
<comment>"Game mode" is the Windows feature to prevent notification when playing a game.</comment>
</data>
<data name="GeneralPage_ShowNewUpdatesToast.Description" xml:space="preserve">
<value>Notifications in the settings and the tray flyout are always shown</value>
</data>
<data name="GeneralPage_ShowNewUpdatesToast.Header" xml:space="preserve">
<value>Show notifications for new updates</value>
</data>
<data name="General_UpdateSettings.Header" xml:space="preserve">
<value>Update settings</value>
</data>
<data name="GPO_SomeSettingsAreManaged.Title" xml:space="preserve">
<value>Some settings are managed by your organization.</value>
</data>