mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +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:
@@ -2675,6 +2675,18 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<data name="QuickAccent_Description_Indicator.Header" xml:space="preserve">
|
||||
<value>Show the Unicode code and name of the currently selected character</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SortByUsageFrequency_Indicator.Header" xml:space="preserve">
|
||||
<value>Sort characters by usage frequency</value>
|
||||
</data>
|
||||
<data name="QuickAccent_SortByUsageFrequency_Indicator.Description" xml:space="preserve">
|
||||
<value>Track characters usage frequency and sort them accordingly</value>
|
||||
</data>
|
||||
<data name="QuickAccent_StartSelectionFromTheLeft_Indicator.Header" xml:space="preserve">
|
||||
<value>Start selection from the left</value>
|
||||
</data>
|
||||
<data name="QuickAccent_StartSelectionFromTheLeft_Indicator.Description" xml:space="preserve">
|
||||
<value>Start selection from the leftmost character for all activation keys, including left and right arrows</value>
|
||||
</data>
|
||||
<data name="QuickAccent_DisableFullscreen.Header" xml:space="preserve">
|
||||
<value>Disable when Game Mode is On</value>
|
||||
</data>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -114,6 +114,12 @@
|
||||
<labs:SettingsCard x:Uid="QuickAccent_Description_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=}">
|
||||
<ToggleSwitch x:Uid="QuickAccent_UnicodeDescription_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.ShowUnicodeDescription}" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard x:Uid="QuickAccent_SortByUsageFrequency_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=}">
|
||||
<ToggleSwitch x:Uid="QuickAccent_SortByUsageFrequency_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SortByUsageFrequency}" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard x:Uid="QuickAccent_StartSelectionFromTheLeft_Indicator" HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily}, Glyph=}">
|
||||
<ToggleSwitch x:Uid="QuickAccent_StartSelectionFromTheLeft_ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.StartSelectionFromTheLeft}" />
|
||||
</labs:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup
|
||||
|
||||
Reference in New Issue
Block a user