mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[QuickAccent]Add setting to sort characters by use frequency (#22847)
* [Quick Accent] add toggle switch to sort characters by usage frequency * [Quick Accent] if enabled, then sort by frequency for all toolbar triggers * [Quick Accent] add "start selection from the left" toggle switch * [Quick Accent] fix error SA1000: The keyword 'new' should not be followed by a space * Fix C# analyzer build error
This commit is contained in:
@@ -256,6 +256,42 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool SortByUsageFrequency
|
||||
{
|
||||
get
|
||||
{
|
||||
return _powerAccentSettings.Properties.SortByUsageFrequency;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _powerAccentSettings.Properties.SortByUsageFrequency)
|
||||
{
|
||||
_powerAccentSettings.Properties.SortByUsageFrequency = value;
|
||||
OnPropertyChanged(nameof(SortByUsageFrequency));
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool StartSelectionFromTheLeft
|
||||
{
|
||||
get
|
||||
{
|
||||
return _powerAccentSettings.Properties.StartSelectionFromTheLeft;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _powerAccentSettings.Properties.StartSelectionFromTheLeft)
|
||||
{
|
||||
_powerAccentSettings.Properties.StartSelectionFromTheLeft = value;
|
||||
OnPropertyChanged(nameof(StartSelectionFromTheLeft));
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RaisePropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
// Notify UI of property change
|
||||
|
||||
Reference in New Issue
Block a user