[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
6 changed files with 32 additions and 4 deletions

View File

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

View File

@@ -85,7 +85,7 @@
<UsePrecompiledHeaders Condition="'$(TF_BUILD)' != ''">false</UsePrecompiledHeaders> <UsePrecompiledHeaders Condition="'$(TF_BUILD)' != ''">false</UsePrecompiledHeaders>
<!-- Change this to bust the cache --> <!-- 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. 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. // See the LICENSE file in the project root for more information.
using System.Diagnostics; using System.Diagnostics;
using Common.UI;
namespace Microsoft.PowerToys.Settings.UI.Helpers namespace Microsoft.PowerToys.Settings.UI.Helpers
{ {
@@ -10,6 +11,10 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
{ {
public const string ColorsSettings = "ms-settings:colors"; 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) public static void Start(string process)
{ {
Process.Start(new ProcessStartInfo(process) { UseShellExecute = true }); Process.Start(new ProcessStartInfo(process) { UseShellExecute = true });

View File

@@ -148,7 +148,11 @@
IsClosable="False" IsClosable="False"
IsOpen="True" IsOpen="True"
Severity="Informational" 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 <tkcontrols:SettingsExpander
x:Uid="MouseUtils_FindMyMouse_ExcludedApps" x:Uid="MouseUtils_FindMyMouse_ExcludedApps"
HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}" HeaderIcon="{ui:FontIcon Glyph=&#xECE4;}"

View File

@@ -2,6 +2,8 @@
// The Microsoft Corporation licenses this file to you under the MIT license. // The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // 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.Helpers;
using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.ViewModels; using Microsoft.PowerToys.Settings.UI.ViewModels;
@@ -49,5 +51,17 @@ namespace Microsoft.PowerToys.Settings.UI.Views
{ {
ViewModel.RefreshEnabledState(); 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> <value>Time before the spotlight appears (ms)</value>
<comment>ms = milliseconds</comment> <comment>ms = milliseconds</comment>
</data> </data>
<data name="MouseUtils_FindMyMouse_AnimationDurationMs_Disabled.Message" xml:space="preserve"> <data name="MouseUtils_FindMyMouse_AnimationDurationMs_Disabled.Title" xml:space="preserve">
<value>Animations are disabled by OS. See Settings &gt; Accessibility &gt; Visual effects</value> <value>Animations are disabled in your system settings.</value>
</data> </data>
<data name="MouseUtils_FindMyMouse_ShakingMinimumDistance.Header" xml:space="preserve"> <data name="MouseUtils_FindMyMouse_ShakingMinimumDistance.Header" xml:space="preserve">
<value>Shake minimum distance</value> <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"> <data name="MouseWithoutBorders_PolicyIPAddressMappingInfo_TextBoxControl.Description" xml:space="preserve">
<value>You can not change, remove or disable these enforced rules.</value> <value>You can not change, remove or disable these enforced rules.</value>
</data> </data>
<data name="OpenSettings.Content" xml:space="preserve">
<value>Open settings</value>
</data>
</root> </root>