mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[FindMyMouse] Add setting for excluded apps (#16308)
* refactor find_app_name_in_path * Add a setting for excluded apps * Restore game_mode.h
This commit is contained in:
@@ -32,6 +32,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
[JsonPropertyName("spotlight_initial_zoom")]
|
||||
public IntProperty SpotlightInitialZoom { get; set; }
|
||||
|
||||
[JsonPropertyName("excluded_apps")]
|
||||
public StringProperty ExcludedApps { get; set; }
|
||||
|
||||
public FindMyMouseProperties()
|
||||
{
|
||||
ActivationMethod = new IntProperty(0);
|
||||
@@ -42,6 +45,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
SpotlightRadius = new IntProperty(100);
|
||||
AnimationDurationMs = new IntProperty(500);
|
||||
SpotlightInitialZoom = new IntProperty(9);
|
||||
ExcludedApps = new StringProperty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
_findMyMouseSpotlightRadius = FindMyMouseSettingsConfig.Properties.SpotlightRadius.Value;
|
||||
_findMyMouseAnimationDurationMs = FindMyMouseSettingsConfig.Properties.AnimationDurationMs.Value;
|
||||
_findMyMouseSpotlightInitialZoom = FindMyMouseSettingsConfig.Properties.SpotlightInitialZoom.Value;
|
||||
_findMyMouseExcludedApps = FindMyMouseSettingsConfig.Properties.ExcludedApps.Value;
|
||||
|
||||
if (mouseHighlighterSettingsRepository == null)
|
||||
{
|
||||
@@ -266,6 +267,24 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public string FindMyMouseExcludedApps
|
||||
{
|
||||
get
|
||||
{
|
||||
return _findMyMouseExcludedApps;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _findMyMouseExcludedApps)
|
||||
{
|
||||
_findMyMouseExcludedApps = value;
|
||||
FindMyMouseSettingsConfig.Properties.ExcludedApps.Value = value;
|
||||
NotifyFindMyMousePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void NotifyFindMyMousePropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
OnPropertyChanged(propertyName);
|
||||
@@ -613,6 +632,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
private int _findMyMouseSpotlightRadius;
|
||||
private int _findMyMouseAnimationDurationMs;
|
||||
private int _findMyMouseSpotlightInitialZoom;
|
||||
private string _findMyMouseExcludedApps;
|
||||
|
||||
private bool _isMouseHighlighterEnabled;
|
||||
private string _highlighterLeftButtonClickColor;
|
||||
|
||||
Reference in New Issue
Block a user