[QuickAccent]Add a setting for the menu delay time (#20221)

This commit is contained in:
Jaime Bernardo
2022-09-01 16:56:19 +01:00
committed by GitHub
parent 006165574e
commit 3f3e837c36
5 changed files with 52 additions and 2 deletions

View File

@@ -41,6 +41,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
_powerAccentSettings = new PowerAccentSettings();
}
_inputTimeMs = _powerAccentSettings.Properties.InputTime.Value;
switch (_powerAccentSettings.Properties.ToolbarPosition.Value)
{
case "Top center":
@@ -111,6 +113,27 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
private int _inputTimeMs = 200;
public int InputTimeMs
{
get
{
return _inputTimeMs;
}
set
{
if (value != _inputTimeMs)
{
_inputTimeMs = value;
_powerAccentSettings.Properties.InputTime.Value = value;
OnPropertyChanged(nameof(InputTimeMs));
RaisePropertyChanged();
}
}
}
private int _toolbarPositionIndex;
public int ToolbarPositionIndex