Merge branch 'dev' into FixSound

This commit is contained in:
DB P 2023-03-13 08:58:06 +09:00 committed by GitHub
commit 91f93510e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 66 additions and 50 deletions

View file

@ -59,6 +59,7 @@
<SolidColorBrush x:Key="ThemeHoverButton" Color="#3c3c3c" />
<SolidColorBrush x:Key="PopuBGColor" Color="#202020" />
<SolidColorBrush x:Key="PopupBGColor" Color="#202020" />
<SolidColorBrush x:Key="PopupTextColor" Color="#cfcfcf" />
<SolidColorBrush x:Key="PopupButtonAreaBGColor" Color="#2b2b2b" />
<SolidColorBrush x:Key="PopupButtonAreaBorderColor" Color="#3f3f3f" />

View file

@ -51,7 +51,9 @@
<SolidColorBrush x:Key="BasicLabelColor" Color="#1b1b1b" />
<SolidColorBrush x:Key="ThemeHoverButton" Color="#f6f6f6" />
<!-- Typo -->
<SolidColorBrush x:Key="PopuBGColor" Color="#ffffff" />
<SolidColorBrush x:Key="PopupBGColor" Color="#ffffff" />
<SolidColorBrush x:Key="PopupTextColor" Color="#1b1b1b" />
<SolidColorBrush x:Key="PopupButtonAreaBGColor" Color="#f3f3f3" />
<SolidColorBrush x:Key="PopupButtonAreaBorderColor" Color="#e5e5e5" />

View file

@ -1932,9 +1932,25 @@
<StackPanel Grid.Row="3">
<Border
Height="64"
Margin="0,8,0,0"
CornerRadius="5 5 0 0"
Style="{DynamicResource SettingGroupBox}">
<ItemsControl Style="{StaticResource SettingGrid}">
<StackPanel Style="{StaticResource TextPanel}">
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource theme}" />
</StackPanel>
<TextBlock Style="{StaticResource Glyph}">
&#xe790;
</TextBlock>
</ItemsControl>
</Border>
<Border
Margin="0,0,0,0"
Padding="0"
HorizontalAlignment="Stretch"
BorderThickness="1,0,1,1"
CornerRadius="0 0 5 5"
Style="{DynamicResource SettingGroupBox}">
<ListBox
Margin="12,12,12,12"
@ -2448,11 +2464,11 @@
Width="300"
Height="35"
Margin="0,0,0,0"
ValidateKeyGesture="True"
HorizontalAlignment="Right"
HorizontalContentAlignment="Right"
Loaded="OnPreviewHotkeyControlLoaded"
LostFocus="OnPreviewHotkeyControlFocusLost" />
LostFocus="OnPreviewHotkeyControlFocusLost"
ValidateKeyGesture="True" />
<TextBlock Style="{StaticResource Glyph}">
&#xe8a1;
</TextBlock>

View file

@ -178,7 +178,7 @@
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
@ -291,9 +291,9 @@
Margin="10,15,10,10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
DisplayMemberPath="Description"
ItemsSource="{Binding IndexSearchEngines}"
SelectedItem="{Binding SelectedIndexSearchEngine}"
DisplayMemberPath="Description"/>
SelectedItem="{Binding SelectedIndexSearchEngine}" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
@ -308,9 +308,9 @@
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
DisplayMemberPath="Description"
ItemsSource="{Binding ContentIndexSearchEngines}"
SelectedItem="{Binding SelectedContentSearchEngine}"
DisplayMemberPath="Description"/>
SelectedItem="{Binding SelectedContentSearchEngine}" />
<TextBlock
Grid.Row="2"
Grid.Column="0"
@ -325,8 +325,8 @@
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding PathEnumerationEngines}"
DisplayMemberPath="Description"
ItemsSource="{Binding PathEnumerationEngines}"
SelectedItem="{Binding SelectedPathEnumerationEngine}" />
</Grid>
</StackPanel>
@ -349,13 +349,15 @@
Style="{DynamicResource ExplorerTabItem}">
<StackPanel Margin="10" Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="10"
<TextBlock
Margin="10"
VerticalAlignment="Center"
Text="{DynamicResource flowlauncher_plugin_everything_search_fullpath}"/>
<CheckBox Margin="10"
Text="{DynamicResource flowlauncher_plugin_everything_search_fullpath}"
TextBlock.Foreground="{DynamicResource Color05B}" />
<CheckBox
Margin="10"
VerticalAlignment="Center"
IsChecked="{Binding Settings.EverythingSearchFullPath}">
</CheckBox>
IsChecked="{Binding Settings.EverythingSearchFullPath}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Grid Margin="20,10,0,10">

View file

@ -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>

View file

@ -35,6 +35,9 @@ namespace Flow.Launcher.Plugin.WebSearch
}
public string Url { get; set; }
[JsonIgnore]
public bool Status => Enabled;
public bool Enabled { get; set; }
public SearchSource DeepCopy()

View file

@ -8,7 +8,7 @@
Title="{DynamicResource flowlauncher_plugin_websearch_window_title}"
Width="550"
d:DataContext="{d:DesignInstance vm:SearchSourceViewModel}"
Background="{DynamicResource PopuBGColor}"
Background="{DynamicResource PopupBGColor}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
@ -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"

View file

@ -69,23 +69,11 @@
<GridViewColumn
Width="130"
DisplayMemberBinding="{Binding ActionKeyword}"
Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding ActionKeyword}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}"/>
<GridViewColumn
Width="350"
DisplayMemberBinding="{Binding Title}"
Header="{DynamicResource flowlauncher_plugin_websearch_title}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Title}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
Header="{DynamicResource flowlauncher_plugin_websearch_title}"/>
<GridViewColumn Width="140" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
<GridViewColumn.CellTemplate>
<DataTemplate>
@ -94,7 +82,7 @@
<Style TargetType="TextBlock">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_false}" />
<Style.Triggers>
<DataTrigger Binding="{Binding Enabled, UpdateSourceTrigger=PropertyChanged}" Value="True">
<DataTrigger Binding="{Binding Status, UpdateSourceTrigger=PropertyChanged}" Value="True">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_true}" />
</DataTrigger>
</Style.Triggers>
@ -158,7 +146,7 @@
Margin="0,0,8,0"
IsChecked="{Binding Settings.EnableSuggestion}" />
</StackPanel>
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSaerchSuggestion is not working -->
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSearchSuggestion is not working -->
</DockPanel>
</Border>
</Grid>

View file

@ -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)
{

View file

@ -127,7 +127,8 @@ And you can download <a href="https://github.com/Flow-Launcher/Flow.Launcher/dis
<img src="https://user-images.githubusercontent.com/6903107/144517502-5325de01-d0d9-4c2e-aafb-33c3f5d82f81.png" width="400">
<img src="https://user-images.githubusercontent.com/6903107/144831031-0e01e8ea-3247-4ba4-a7b4-48b0db620bc1.png" width="400">
<img src="https://user-images.githubusercontent.com/6903107/207141710-50bc0e6b-f0f8-4dc2-a136-621a473689d7.png" width="400">
<img src="https://user-images.githubusercontent.com/6903107/222829602-aabb1144-db5c-4250-b5ae-66f8342e4ae4.png" width="400">
### Browser Bookmarks