mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Fix Enabled Label
- Fix Error when Click the Icon ColumnHeader
This commit is contained in:
parent
520ef3777f
commit
45ff919f81
3 changed files with 22 additions and 19 deletions
|
|
@ -12,6 +12,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_websearch_delete">Delete</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_edit">Edit</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_add">Add</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_enabled_label">Enabled</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_true">Enabled</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_false">Disabled</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_websearch_confirm">Confirm</system:String>
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@
|
|||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource flowlauncher_plugin_websearch_enabled}" />
|
||||
Text="{DynamicResource flowlauncher_plugin_websearch_enabled_label}" />
|
||||
<CheckBox
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
|
|
|
|||
|
|
@ -96,27 +96,29 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
var columnBinding = headerClicked.Column.DisplayMemberBinding as Binding;
|
||||
var sortBy = columnBinding?.Path.Path ?? headerClicked.Column.Header as string;
|
||||
|
||||
Sort(sortBy, direction);
|
||||
if(sortBy != null) {
|
||||
Sort(sortBy, direction);
|
||||
|
||||
if (direction == ListSortDirection.Ascending)
|
||||
{
|
||||
headerClicked.Column.HeaderTemplate =
|
||||
Resources["HeaderTemplateArrowUp"] as DataTemplate;
|
||||
}
|
||||
else
|
||||
{
|
||||
headerClicked.Column.HeaderTemplate =
|
||||
Resources["HeaderTemplateArrowDown"] as DataTemplate;
|
||||
}
|
||||
if (direction == ListSortDirection.Ascending)
|
||||
{
|
||||
headerClicked.Column.HeaderTemplate =
|
||||
Resources["HeaderTemplateArrowUp"] as DataTemplate;
|
||||
}
|
||||
else
|
||||
{
|
||||
headerClicked.Column.HeaderTemplate =
|
||||
Resources["HeaderTemplateArrowDown"] as DataTemplate;
|
||||
}
|
||||
|
||||
// Remove arrow from previously sorted header
|
||||
if (_lastHeaderClicked != null && _lastHeaderClicked != headerClicked)
|
||||
{
|
||||
_lastHeaderClicked.Column.HeaderTemplate = null;
|
||||
}
|
||||
// Remove arrow from previously sorted header
|
||||
if (_lastHeaderClicked != null && _lastHeaderClicked != headerClicked)
|
||||
{
|
||||
_lastHeaderClicked.Column.HeaderTemplate = null;
|
||||
}
|
||||
|
||||
_lastHeaderClicked = headerClicked;
|
||||
_lastDirection = direction;
|
||||
_lastHeaderClicked = headerClicked;
|
||||
_lastDirection = direction;
|
||||
}
|
||||
}
|
||||
private void Sort(string sortBy, ListSortDirection direction)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue