|
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
| 7 | + xmlns:ui="http://schemas.modernwpf.com/2019" |
7 | 8 | Title="{DynamicResource flowlauncher_plugin_program_suffixes}"
|
8 |
| - Width="400" |
| 9 | + Width="600" |
9 | 10 | Background="{DynamicResource PopuBGColor}"
|
10 | 11 | Foreground="{DynamicResource PopupTextColor}"
|
| 12 | + DataContext="{Binding RelativeSource={RelativeSource Self}}" |
11 | 13 | ResizeMode="NoResize"
|
12 | 14 | SizeToContent="Height"
|
13 | 15 | WindowStartupLocation="CenterScreen"
|
14 | 16 | mc:Ignorable="d">
|
15 | 17 | <WindowChrome.WindowChrome>
|
16 | 18 | <WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
17 | 19 | </WindowChrome.WindowChrome>
|
18 |
| - <Grid> |
| 20 | + <Window.Resources> |
| 21 | + <Style |
| 22 | + x:Key="CustomFileTypeTextBox" |
| 23 | + BasedOn="{StaticResource DefaultTextBoxStyle}" |
| 24 | + TargetType="TextBox"> |
| 25 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 26 | + <Style.Triggers> |
| 27 | + <DataTrigger Binding="{Binding ElementName=CustomFiles, Path=IsChecked}" Value="True"> |
| 28 | + <Setter Property="Visibility" Value="Visible" /> |
| 29 | + </DataTrigger> |
| 30 | + </Style.Triggers> |
| 31 | + </Style> |
| 32 | + <Style |
| 33 | + x:Key="CustomURLTypeTextBox" |
| 34 | + BasedOn="{StaticResource DefaultTextBoxStyle}" |
| 35 | + TargetType="TextBox"> |
| 36 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 37 | + <Style.Triggers> |
| 38 | + <DataTrigger Binding="{Binding ElementName=CustomProtocol, Path=IsChecked}" Value="True"> |
| 39 | + <Setter Property="Visibility" Value="Visible" /> |
| 40 | + </DataTrigger> |
| 41 | + </Style.Triggers> |
| 42 | + </Style> |
| 43 | + |
| 44 | + <Style x:Key="SettingGroupBoxSuffixToolTip" TargetType="Border"> |
| 45 | + <Setter Property="Background" Value="{DynamicResource Color00B}" /> |
| 46 | + <Setter Property="BorderBrush" Value="{DynamicResource Color03B}" /> |
| 47 | + <Setter Property="BorderThickness" Value="1" /> |
| 48 | + <Setter Property="CornerRadius" Value="5" /> |
| 49 | + <Setter Property="Margin" Value="0,5,0,0" /> |
| 50 | + <Setter Property="Padding" Value="15,15,15,15" /> |
| 51 | + <Setter Property="SnapsToDevicePixels" Value="True" /> |
| 52 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 53 | + <Style.Triggers> |
| 54 | + <DataTrigger Binding="{Binding ElementName=tbSuffixes, Path=IsFocused}" Value="True"> |
| 55 | + <Setter Property="Visibility" Value="Visible" /> |
| 56 | + </DataTrigger> |
| 57 | + <DataTrigger Binding="{Binding ElementName=tbSuffixes, Path=IsFocused}" Value="False"> |
| 58 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 59 | + </DataTrigger> |
| 60 | + </Style.Triggers> |
| 61 | + </Style> |
| 62 | + |
| 63 | + <Style x:Key="SettingGroupBoxURLToolTip" TargetType="Border"> |
| 64 | + <Setter Property="Background" Value="{DynamicResource Color00B}" /> |
| 65 | + <Setter Property="BorderBrush" Value="{DynamicResource Color03B}" /> |
| 66 | + <Setter Property="BorderThickness" Value="1" /> |
| 67 | + <Setter Property="CornerRadius" Value="5" /> |
| 68 | + <Setter Property="Margin" Value="0,5,0,0" /> |
| 69 | + <Setter Property="Padding" Value="15,15,15,15" /> |
| 70 | + <Setter Property="SnapsToDevicePixels" Value="True" /> |
| 71 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 72 | + <Style.Triggers> |
| 73 | + <DataTrigger Binding="{Binding ElementName=tbProtocols, Path=IsFocused}" Value="True"> |
| 74 | + <Setter Property="Visibility" Value="Visible" /> |
| 75 | + </DataTrigger> |
| 76 | + <DataTrigger Binding="{Binding ElementName=tbProtocols, Path=IsFocused}" Value="False"> |
| 77 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 78 | + </DataTrigger> |
| 79 | + </Style.Triggers> |
| 80 | + </Style> |
| 81 | + |
| 82 | + </Window.Resources> |
| 83 | + |
| 84 | + <Grid x:Name="WindowArea"> |
19 | 85 | <Grid.RowDefinitions>
|
20 |
| - <RowDefinition /> |
| 86 | + <RowDefinition Height="auto" /> |
21 | 87 | <RowDefinition Height="80" />
|
22 | 88 | </Grid.RowDefinitions>
|
23 | 89 |
|
|
55 | 121 | </Grid>
|
56 | 122 | </StackPanel>
|
57 | 123 | <StackPanel Margin="26,12,26,0">
|
| 124 | + |
58 | 125 | <StackPanel Margin="0,0,0,12">
|
| 126 | + |
59 | 127 | <TextBlock
|
60 | 128 | Grid.Column="0"
|
61 | 129 | Margin="0,0,0,0"
|
|
65 | 133 | TextAlignment="Left" />
|
66 | 134 | </StackPanel>
|
67 | 135 | <TextBlock
|
| 136 | + Margin="0,0,0,10" |
68 | 137 | FontSize="14"
|
69 | 138 | Text="{DynamicResource flowlauncher_plugin_program_only_index_tip}"
|
70 | 139 | TextWrapping="Wrap" />
|
71 |
| - <TextBox x:Name="tbSuffixes" Margin="0,20,0,20" /> |
| 140 | + <Border Style="{DynamicResource SettingGroupBoxURLToolTip}"> |
| 141 | + <TextBlock |
| 142 | + FontSize="14" |
| 143 | + Text="{DynamicResource flowlauncher_plugin_program_protocol_tooltip}" |
| 144 | + TextWrapping="Wrap" /> |
| 145 | + </Border> |
| 146 | + |
| 147 | + <Border Style="{DynamicResource SettingGroupBoxSuffixToolTip}"> |
| 148 | + <TextBlock |
| 149 | + FontSize="14" |
| 150 | + Text="{DynamicResource flowlauncher_plugin_program_suffixes_tooltip}" |
| 151 | + TextWrapping="Wrap" /> |
| 152 | + </Border> |
| 153 | + |
| 154 | + <Grid Margin="0,20,0,12"> |
| 155 | + <Grid.ColumnDefinitions> |
| 156 | + <ColumnDefinition Width="250" /> |
| 157 | + <ColumnDefinition Width="250" /> |
| 158 | + </Grid.ColumnDefinitions> |
| 159 | + |
| 160 | + <StackPanel Grid.Column="0" Margin="0,0,0,0"> |
| 161 | + <TextBlock |
| 162 | + Margin="0,0,0,8" |
| 163 | + FontSize="16" |
| 164 | + FontWeight="SemiBold" |
| 165 | + Text="{DynamicResource flowlauncher_plugin_program_suffixes_excutable_types}" /> |
| 166 | + <CheckBox Name="apprefMS" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[appref-ms]}">appref-ms</CheckBox> |
| 167 | + <CheckBox Name="exe" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[exe]}">exe</CheckBox> |
| 168 | + <CheckBox Name="lnk" Margin="10,0,0,0" IsChecked="{Binding SuffixesStatus[lnk]}">lnk</CheckBox> |
| 169 | + <CheckBox |
| 170 | + Name="CustomFiles" |
| 171 | + Margin="10,0,0,0" |
| 172 | + IsChecked="{Binding UseCustomSuffixes}" |
| 173 | + Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_file_types}" /> |
| 174 | + <TextBox |
| 175 | + x:Name="tbSuffixes" |
| 176 | + Margin="10,4,0,6" |
| 177 | + Style="{StaticResource CustomFileTypeTextBox}" /> |
| 178 | + </StackPanel> |
| 179 | + |
| 180 | + <Border |
| 181 | + Grid.Column="1" |
| 182 | + Margin="20,0,0,10" |
| 183 | + Padding="20,0,0,0" |
| 184 | + BorderBrush="{DynamicResource PopupButtonAreaBorderColor}" |
| 185 | + BorderThickness="1,0,0,0"> |
| 186 | + <StackPanel> |
| 187 | + <TextBlock |
| 188 | + Margin="0,0,0,8" |
| 189 | + FontSize="16" |
| 190 | + FontWeight="SemiBold" |
| 191 | + Text="{DynamicResource flowlauncher_plugin_program_suffixes_URL_types}" /> |
| 192 | + <CheckBox Name="steam" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[steam]}">Steam Games</CheckBox> |
| 193 | + <CheckBox Name="epic" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[epic]}">Epic Games</CheckBox> |
| 194 | + <CheckBox Name="http" Margin="10,0,0,0" IsChecked="{Binding ProtocolsStatus[http]}">Http/Https</CheckBox> |
| 195 | + <CheckBox |
| 196 | + Name="CustomProtocol" |
| 197 | + Margin="10,0,0,0" |
| 198 | + IsChecked="{Binding UseCustomProtocols}" |
| 199 | + Content="{DynamicResource flowlauncher_plugin_program_suffixes_custom_urls}" /> |
| 200 | + <TextBox |
| 201 | + x:Name="tbProtocols" |
| 202 | + Margin="10,4,0,6" |
| 203 | + Style="{StaticResource CustomURLTypeTextBox}" /> |
| 204 | + </StackPanel> |
| 205 | + </Border> |
| 206 | + </Grid> |
72 | 207 | </StackPanel>
|
73 | 208 | </StackPanel>
|
74 | 209 | <Border
|
|
78 | 213 | BorderThickness="0,1,0,0">
|
79 | 214 | <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
80 | 215 | <Button
|
81 |
| - x:Name="btnCancel" |
| 216 | + x:Name="btnReset" |
82 | 217 | Height="30"
|
83 | 218 | MinWidth="140"
|
84 | 219 | Margin="0,0,5,0"
|
| 220 | + Click="BtnReset_OnClick" |
| 221 | + Content="{DynamicResource flowlauncher_plugin_program_reset}" /> |
| 222 | + <Button |
| 223 | + x:Name="btnCancel" |
| 224 | + Height="30" |
| 225 | + MinWidth="140" |
| 226 | + Margin="5,0,5,0" |
85 | 227 | Click="BtnCancel_OnClick"
|
86 | 228 | Content="{DynamicResource cancel}" />
|
87 | 229 |
|
|
90 | 232 | MinWidth="140"
|
91 | 233 | Margin="5,0,0,0"
|
92 | 234 | HorizontalAlignment="Right"
|
93 |
| - Click="ButtonBase_OnClick" |
| 235 | + Click="BtnAdd_OnClick" |
94 | 236 | Content="{DynamicResource flowlauncher_plugin_program_update}"
|
95 | 237 | Style="{DynamicResource AccentButtonStyle}" />
|
96 | 238 | </StackPanel>
|
|
0 commit comments