|
1 | 1 | <UserControl
|
2 |
| - x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.SettingsControl" |
3 |
| - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 |
| - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 |
| - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 |
| - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 |
| - d:DesignHeight="300" |
8 |
| - d:DesignWidth="500" |
9 |
| - DataContext="{Binding RelativeSource={RelativeSource Self}}" |
10 |
| - mc:Ignorable="d"> |
| 2 | + x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.SettingsControl" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 7 | + d:DesignHeight="300" |
| 8 | + d:DesignWidth="500" |
| 9 | + DataContext="{Binding RelativeSource={RelativeSource Self}}" |
| 10 | + mc:Ignorable="d"> |
11 | 11 | <Grid Margin="60,0,10,0">
|
12 | 12 | <Grid.RowDefinitions>
|
13 |
| - <RowDefinition Height="auto"/> |
| 13 | + <RowDefinition Height="auto" /> |
14 | 14 | </Grid.RowDefinitions>
|
15 | 15 | <StackPanel Margin="0,10,0,10" Orientation="Vertical">
|
16 | 16 | <StackPanel Orientation="Horizontal">
|
17 |
| - <TextBlock Margin="10" Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}"/> |
18 |
| - <CheckBox Margin="0,0,15,0" |
19 |
| - Content="Chrome" |
20 |
| - IsChecked="{Binding Settings.LoadChromeBookmark}"/> |
21 |
| - <CheckBox Margin="0,0,15,0" |
22 |
| - Content="Edge" |
23 |
| - IsChecked="{Binding Settings.LoadEdgeBookmark}"/> |
24 |
| - <CheckBox Margin="0,0,15,0" |
25 |
| - Content="Firefox" |
26 |
| - IsChecked="{Binding Settings.LoadFirefoxBookmark}"/> |
| 17 | + <TextBlock Margin="10" Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" /> |
| 18 | + <CheckBox |
| 19 | + Margin="0,0,15,0" |
| 20 | + Content="Chrome" |
| 21 | + IsChecked="{Binding Settings.LoadChromeBookmark}" /> |
| 22 | + <CheckBox |
| 23 | + Margin="0,0,15,0" |
| 24 | + Content="Edge" |
| 25 | + IsChecked="{Binding Settings.LoadEdgeBookmark}" /> |
| 26 | + <CheckBox |
| 27 | + Margin="0,0,15,0" |
| 28 | + Content="Firefox" |
| 29 | + IsChecked="{Binding Settings.LoadFirefoxBookmark}" /> |
27 | 30 | <Button
|
28 |
| - Margin="0,0,15,0" |
29 |
| - Click="Others_Click" |
30 |
| - Content="{DynamicResource flowlauncher_plugin_browserbookmark_others}"/> |
| 31 | + Margin="0,0,15,0" |
| 32 | + Click="Others_Click" |
| 33 | + Content="{DynamicResource flowlauncher_plugin_browserbookmark_others}" /> |
31 | 34 | </StackPanel>
|
32 | 35 | <StackPanel Name="CustomBrowsersList" Visibility="Collapsed">
|
33 | 36 | <ListView
|
34 |
| - Name="CustomBrowsers" |
35 |
| - Height="auto" |
36 |
| - Margin="10" |
37 |
| - BorderBrush="DarkGray" |
38 |
| - BorderThickness="1" |
39 |
| - ItemsSource="{Binding Settings.CustomChromiumBrowsers}" |
40 |
| - MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser" |
41 |
| - SelectedItem="{Binding SelectedCustomBrowser}" |
42 |
| - Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"> |
| 37 | + Name="CustomBrowsers" |
| 38 | + Height="auto" |
| 39 | + Margin="10" |
| 40 | + BorderBrush="DarkGray" |
| 41 | + BorderThickness="1" |
| 42 | + ItemsSource="{Binding Settings.CustomChromiumBrowsers}" |
| 43 | + MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser" |
| 44 | + SelectedItem="{Binding SelectedCustomBrowser}" |
| 45 | + Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"> |
43 | 46 | <ListView.View>
|
44 | 47 | <GridView>
|
45 |
| - <GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" |
46 |
| - Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}"/> |
47 |
| - <GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" |
48 |
| - Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}"/> |
49 |
| - <GridViewColumn DisplayMemberBinding="{Binding BrowserType, Mode=OneWay}" |
50 |
| - Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserEngine}"/> |
| 48 | + <GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" /> |
| 49 | + <GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" /> |
| 50 | + <GridViewColumn DisplayMemberBinding="{Binding BrowserType, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserEngine}" /> |
51 | 51 | </GridView>
|
52 | 52 | </ListView.View>
|
53 | 53 | </ListView>
|
54 | 54 | <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
55 | 55 | <Button
|
56 |
| - MinWidth="130" |
57 |
| - Margin="10" |
58 |
| - Click="NewCustomBrowser" |
59 |
| - Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}"/> |
| 56 | + MinWidth="130" |
| 57 | + Margin="10" |
| 58 | + Click="NewCustomBrowser" |
| 59 | + Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" /> |
60 | 60 | <Button
|
61 |
| - MinWidth="120" |
62 |
| - Margin="10" |
63 |
| - Click="DeleteCustomBrowser" |
64 |
| - Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}"/> |
| 61 | + MinWidth="130" |
| 62 | + Margin="10" |
| 63 | + Click="EditCustomBrowser" |
| 64 | + Content="{DynamicResource flowlauncher_plugin_browserbookmark_editBrowserBookmark}"> |
| 65 | + <Button.Style> |
| 66 | + <Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button"> |
| 67 | + <Setter Property="IsEnabled" Value="true" /> |
| 68 | + <Style.Triggers> |
| 69 | + <DataTrigger Binding="{Binding ElementName=CustomBrowsers, Path=SelectedItems.Count}" Value="0"> |
| 70 | + <Setter Property="IsEnabled" Value="false" /> |
| 71 | + </DataTrigger> |
| 72 | + </Style.Triggers> |
| 73 | + </Style> |
| 74 | + </Button.Style> |
| 75 | + </Button> |
| 76 | + <Button |
| 77 | + MinWidth="120" |
| 78 | + Margin="10" |
| 79 | + Click="DeleteCustomBrowser" |
| 80 | + Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" /> |
65 | 81 | </StackPanel>
|
66 | 82 | </StackPanel>
|
67 | 83 | </StackPanel>
|
|
0 commit comments