mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
[QuickAccent]Add a setting for the menu delay time (#20221)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user