[Settings][Find My Mouse] Improve UX for disabled animations (#34289)

* Improve UX for disabled animations

* bump cache
This commit is contained in:
Davide Giacometti 2024-08-15 17:29:25 +02:00 committed by GitHub
parent 2979dc7d15
commit c58a4f4668
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 32 additions and 4 deletions

View File

@ -407,6 +407,7 @@ dxgi
dxgidebug
dxgiformat
dxguid
easeofaccess
ecount
EData
Edid
@ -1712,6 +1713,7 @@ vih
VIRTUALDESK
visiblecolorformats
Visibletrue
visualeffects
VKey
vmovl
vorrq

View File

@ -85,7 +85,7 @@
<UsePrecompiledHeaders Condition="'$(TF_BUILD)' != ''">false</UsePrecompiledHeaders>
<!-- Change this to bust the cache -->
<MSBuildCacheCacheUniverse Condition="'$(MSBuildCacheCacheUniverse)' == ''">202408050737</MSBuildCacheCacheUniverse>
<MSBuildCacheCacheUniverse Condition="'$(MSBuildCacheCacheUniverse)' == ''">202408150737</MSBuildCacheCacheUniverse>
<!--
Visual Studio telemetry reads various ApplicationInsights.config files and other files after the project is finished, likely in a detached process.

View File

@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
using Common.UI;
namespace Microsoft.PowerToys.Settings.UI.Helpers
{
@ -10,6 +11,10 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
{
public const string ColorsSettings = "ms-settings:colors";
public static string AnimationsSettings => OSVersionHelper.IsWindows11()
? "ms-settings:easeofaccess-visualeffects"
: "ms-settings:easeofaccess-display";
public static void Start(string process)
{
Process.Start(new ProcessStartInfo(process) { UseShellExecute = true });

View File

@ -148,7 +148,11 @@
IsClosable="False"
IsOpen="True"
Severity="Informational"
Visibility="{x:Bind ViewModel.IsAnimationEnabledBySystem, Mode=OneWay, Converter={StaticResource BoolToInvertedVisibilityConverter}}" />
Visibility="{x:Bind ViewModel.IsAnimationEnabledBySystem, Mode=OneWay, Converter={StaticResource BoolToInvertedVisibilityConverter}}">
<InfoBar.ActionButton>
<HyperlinkButton x:Uid="OpenSettings" Click="OpenAnimationsSettings_Click" />
</InfoBar.ActionButton>
</InfoBar>
<tkcontrols:SettingsExpander
x:Uid="MouseUtils_FindMyMouse_ExcludedApps"
HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}"

View File

@ -2,6 +2,8 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.ViewModels;
@ -49,5 +51,17 @@ namespace Microsoft.PowerToys.Settings.UI.Views
{
ViewModel.RefreshEnabledState();
}
private void OpenAnimationsSettings_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
{
try
{
StartProcessHelper.Start(StartProcessHelper.AnimationsSettings);
}
catch (Exception ex)
{
Logger.LogError("Error while trying to open the animations settings", ex);
}
}
}
}

View File

@ -2708,8 +2708,8 @@ Right-click to remove the key combination, thereby deactivating the shortcut.</v
<value>Time before the spotlight appears (ms)</value>
<comment>ms = milliseconds</comment>
</data>
<data name="MouseUtils_FindMyMouse_AnimationDurationMs_Disabled.Message" xml:space="preserve">
<value>Animations are disabled by OS. See Settings &gt; Accessibility &gt; Visual effects</value>
<data name="MouseUtils_FindMyMouse_AnimationDurationMs_Disabled.Title" xml:space="preserve">
<value>Animations are disabled in your system settings.</value>
</data>
<data name="MouseUtils_FindMyMouse_ShakingMinimumDistance.Header" xml:space="preserve">
<value>Shake minimum distance</value>
@ -4205,4 +4205,7 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="MouseWithoutBorders_PolicyIPAddressMappingInfo_TextBoxControl.Description" xml:space="preserve">
<value>You can not change, remove or disable these enforced rules.</value>
</data>
<data name="OpenSettings.Content" xml:space="preserve">
<value>Open settings</value>
</data>
</root>