Flow.Launcher/Plugins/Flow.Launcher.Plugin.Explorer/Views/QuickAccessLinkSettings.xaml
2025-06-17 16:50:42 +09:00

174 lines
No EOL
7.6 KiB
XML

<Window
x:Class="Flow.Launcher.Plugin.Explorer.Views.QuickAccessLinkSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Plugin.Explorer.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{DynamicResource plugin_explorer_manage_quick_access_links_header}"
Width="Auto"
Height="300"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Width"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="4"
Click="BtnCancel_OnClick"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>
<StackPanel Margin="26 0 26 0">
<StackPanel Margin="0 0 0 12">
<TextBlock
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource plugin_explorer_manage_quick_access_links_header}"
TextAlignment="Left" />
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="100" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Name -->
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="0 10 0 0"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource plugin_explorer_name}" />
<TextBox
Grid.Row="0"
Grid.Column="1"
Margin="10 10 0 0"
VerticalAlignment="Center"
FontSize="12"
Text="{Binding SelectedName, Mode=TwoWay}" />
<!-- Type -->
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="0 10 0 0"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource plugin_explorer_type}" />
<StackPanel
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<RadioButton
Margin="10 10 0 0"
Content="{DynamicResource plugin_explorer_file}"
GroupName="PathType"
IsChecked="{Binding IsFileSelected}" />
<RadioButton
Margin="10 10 0 0"
Content="{DynamicResource plugin_explorer_folder}"
GroupName="PathType"
IsChecked="{Binding IsFolderSelected}" />
</StackPanel>
<!-- Path -->
<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="0 10 0 0"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource plugin_explorer_path}" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Width="250"
Margin="10 10 0 0"
VerticalAlignment="Center"
FontSize="12"
IsReadOnly="True"
Text="{Binding SelectedPath, Mode=TwoWay}" />
<Button
Grid.Row="2"
Grid.Column="2"
Height="Auto"
MinWidth="80"
Margin="10 10 0 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Click="SelectPath_OnClick"
Content="{DynamicResource select}" />
</Grid>
</StackPanel>
</StackPanel>
<Border
Grid.Row="1"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0 1 0 0">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Button
x:Name="btnCancel"
Width="145"
Height="34"
Margin="0 0 5 1"
Click="BtnCancel_OnClick"
Content="{DynamicResource cancel}" />
<Button
Name="DownButton"
Width="145"
Height="34"
Margin="5 0 0 1"
Click="OnDoneButtonClick"
Style="{StaticResource AccentButtonStyle}">
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
</Button>
</StackPanel>
</Border>
</Grid>
</Window>