Skip to content

Commit 962af51

Browse files
committed
add some string
add some style for disable
1 parent 6a2d7fc commit 962af51

File tree

3 files changed

+121
-36
lines changed

3 files changed

+121
-36
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@
130130
<system:String x:Key="releaseNotes">Release Notes</system:String>
131131
<system:String x:Key="documentation">Usage Tips:</system:String>
132132

133+
<!--FileManager Setting Dialog-->
134+
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
135+
<system:String x:Key="fileManager_tips">Please specify the file location of the file manager you using and add arguments (optional) if necessary.</system:String>
136+
<system:String x:Key="fileManager_name">File Manager</system:String>
137+
<system:String x:Key="fileManager_path">Path</system:String>
138+
<system:String x:Key="fileManager_arg">Argument</system:String>
139+
133140
<!--Priority Setting Dialog-->
134141
<system:String x:Key="changePriorityWindow">Change Priority</system:String>
135142
<system:String x:Key="priority_tips">Greater the number, the higher the result will be ranked. Try setting it as 5. If you want the results to be lower than any other plugin's, provide a negative number</system:String>

Flow.Launcher/SelectFileManagerWindow.xaml

Lines changed: 103 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,123 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:ui="http://schemas.modernwpf.com/2019"
67
xmlns:local="clr-namespace:Flow.Launcher"
78
mc:Ignorable="d"
89
WindowStartupLocation="CenterScreen"
9-
Title="SelectFileManagerWindow" Height="450" Width="500" ResizeMode="NoResize" Background="#f3f3f3">
10+
Title="{DynamicResource fileManagerWindow}" Height="420" Width="500" ResizeMode="NoResize" Background="#f3f3f3">
1011
<Grid>
1112
<Grid.RowDefinitions>
12-
<RowDefinition />
13-
<RowDefinition />
1413
<RowDefinition />
1514
<RowDefinition Height="80"/>
1615
</Grid.RowDefinitions>
17-
<Grid.ColumnDefinitions>
18-
<ColumnDefinition />
19-
</Grid.ColumnDefinitions>
20-
<StackPanel Grid.Row="0" VerticalAlignment="Center">
21-
<TextBlock Grid.Column="0" FontFamily="/Resources/#Segoe Fluent Icons" FontSize="40" TextAlignment="Center"
22-
Margin="0 0 0 0">
23-
&#xe8d0;
24-
</TextBlock>
25-
</StackPanel>
16+
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
17+
<Grid>
18+
<StackPanel>
19+
<StackPanel Grid.Row="0" Margin="0 0 0 12">
20+
<TextBlock Grid.Column="0" Text="{DynamicResource fileManagerWindow}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
21+
Margin="0 0 0 0" />
22+
</StackPanel>
23+
<StackPanel>
24+
<TextBlock
25+
Text="{DynamicResource fileManager_tips}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
26+
</StackPanel>
2627

27-
<Border Background="#ffffff" Grid.Row="1" BorderBrush="#cecece" BorderThickness="1" Margin="14 0 14 0" Padding="0 14 0 0" CornerRadius="5">
28-
<StackPanel Orientation="Vertical" >
28+
<StackPanel Orientation="Horizontal" Margin="14 28 0 0">
29+
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
30+
HorizontalAlignment="Left" Text="{DynamicResource fileManager_name}" />
31+
<ComboBox Height="35" SelectedIndex="0" HorizontalAlignment="Left" Margin="14 0 0 0" Name="comboBox" VerticalAlignment="Center" Width="200">
32+
<ComboBoxItem Content="Explorer (Default)" />
33+
<ComboBoxItem Content="Custom" />
34+
<ComboBoxItem Content="Files" />
35+
<ComboBoxItem Content="Directory Opus" />
36+
<ComboBoxItem Content="Total Commander" />
37+
</ComboBox>
38+
</StackPanel>
39+
<Rectangle Margin="0 20 0 12" Height="1" Fill="#cecece"></Rectangle>
40+
<StackPanel Orientation="Horizontal" Margin="0 0 0 0" HorizontalAlignment="Stretch">
41+
<Grid Width="430">
42+
<Grid.ColumnDefinitions>
43+
<ColumnDefinition Width="100"/>
44+
<ColumnDefinition />
45+
</Grid.ColumnDefinitions>
46+
<Grid.RowDefinitions>
47+
<RowDefinition Height="50"/>
48+
<RowDefinition />
49+
</Grid.RowDefinitions>
50+
<TextBlock FontSize="14" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0"
51+
HorizontalAlignment="Left" Text="{DynamicResource fileManager_path}" Margin="14 0 0 0"/>
52+
<TextBox Margin="10 0 15 0" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="0">
53+
<TextBox.Style>
54+
<Style TargetType="TextBox">
55+
<Setter Property="Background" Value="#ffffff"/>
56+
<Setter Property="Height" Value="34"/>
57+
<Setter Property="FontSize" Value="14"/>
58+
<Setter Property="Padding" Value="6 6 0 0"/>
59+
<Setter Property="VerticalAlignment" Value="Center"/>
2960

30-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
31-
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
32-
HorizontalAlignment="Left" Text="{DynamicResource currentPriority}" />
33-
<TextBlock x:Name="OldPriority" Grid.Row="0" Grid.Column="1" Margin="14 0 10 0" FontSize="14"
34-
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" />
35-
</StackPanel>
61+
<Setter Property="BorderBrush" Value="#000000"/>
62+
<Style.Triggers>
63+
<DataTrigger Binding="{Binding Path=SelectedIndex, ElementName=comboBox}" Value="0">
64+
<Setter Property="IsEnabled" Value="False"/>
65+
<Setter Property="Text" Value=""/>
66+
<Setter Property="Background" Value="#cecece"/>
67+
</DataTrigger>
68+
<DataTrigger Binding="{Binding Path=SelectedIndex, ElementName=comboBox}" Value="2">
69+
<Setter Property="Text" Value="Files"/>
70+
71+
</DataTrigger>
72+
<DataTrigger Binding="{Binding Path=SelectedIndex, ElementName=comboBox}" Value="3">
73+
<Setter Property="Text" Value="c:\programe files\dopus\dopus.exe"/>
74+
</DataTrigger>
75+
<DataTrigger Binding="{Binding Path=SelectedIndex, ElementName=comboBox}" Value="4">
76+
<Setter Property="Text" Value="C:\Program Files\TOTALCMD\totalcommander.exe"/>
77+
</DataTrigger>
78+
</Style.Triggers>
79+
</Style>
80+
</TextBox.Style>
3681

37-
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
38-
<TextBlock FontSize="14" VerticalAlignment="Center"
39-
HorizontalAlignment="Right" Text="{DynamicResource newPriority}" />
40-
<TextBox x:Name="tbAction" Margin="14 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
41-
</StackPanel>
82+
</TextBox>
83+
84+
85+
86+
<TextBlock FontSize="14" VerticalAlignment="Center" Margin="14 0 0 0"
87+
HorizontalAlignment="Left" Text="{DynamicResource fileManager_arg}" Grid.Column="0" Grid.Row="1"/>
88+
<TextBox Margin="10 0 15 0" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="1" >
89+
<TextBox.Style>
90+
<Style TargetType="TextBox">
91+
<Setter Property="Background" Value="#ffffff"/>
92+
<Setter Property="Height" Value="34"/>
93+
<Setter Property="FontSize" Value="14"/>
94+
<Setter Property="Padding" Value="6 6 0 0"/>
95+
<Setter Property="VerticalAlignment" Value="Center"/>
4296

43-
</StackPanel>
97+
<Setter Property="BorderBrush" Value="#000000"/>
98+
<Style.Triggers>
99+
<DataTrigger Binding="{Binding Path=SelectedIndex, ElementName=comboBox}" Value="0">
100+
<Setter Property="IsEnabled" Value="False"/>
101+
<Setter Property="Text" Value=""/>
102+
<Setter Property="Background" Value="#cecece"/>
103+
</DataTrigger>
104+
<DataTrigger Binding="{Binding Path=SelectedIndex, ElementName=comboBox}" Value="2">
105+
<Setter Property="Text" Value=""/>
106+
</DataTrigger>
107+
<DataTrigger Binding="{Binding Path=SelectedIndex, ElementName=comboBox}" Value="3">
108+
<Setter Property="Text" Value=""/>
109+
</DataTrigger>
110+
</Style.Triggers>
111+
</Style>
112+
</TextBox.Style>
113+
</TextBox>
114+
</Grid>
115+
</StackPanel>
116+
</StackPanel>
117+
</Grid>
44118
</Border>
45-
<StackPanel Grid.Row="2" VerticalAlignment="Center">
46-
<TextBlock Foreground="Gray"
47-
Text="{DynamicResource priority_tips}" TextWrapping="WrapWithOverflow" TextAlignment="Center"
48-
Margin="20,0,20,0"/>
49-
</StackPanel>
50-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="3" Grid.Column="1">
51-
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="0 0 10 0" Width="80" Height="30"
119+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
120+
<Button x:Name="btnCancel" Margin="0 0 5 0" Width="100" Height="30"
52121
Content="{DynamicResource cancel}" />
53-
<Button x:Name="btnDone" Margin="10 0 0 0" Width="80" Height="30" Click="btnDone_OnClick">
122+
<Button x:Name="btnDone" Margin="5 0 0 0" Width="100" Height="30">
54123
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
55124
</Button>
56125
</StackPanel>

Flow.Launcher/SettingWindow.xaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,17 @@
596596
Style="{DynamicResource SettingSubTitleLabel}" />
597597
</StackPanel>
598598
<StackPanel Grid.Column="2" Orientation="Horizontal">
599-
<Button Margin="10 0 18 0" MaxWidth="200" Width="120"
600-
Content="Explorer" Click="OnSelectFileManagerClick"/>
599+
<Button Margin="10 0 18 0" MaxWidth="250" Width="160"
600+
Content="Explorer" Click="OnSelectFileManagerClick">
601+
<Button.Resources>
602+
<Style TargetType="Border">
603+
<Setter Property="CornerRadius" Value="2"/>
604+
<Setter Property="BorderThickness" Value="1 1 1 2"/>
605+
<Setter Property="BorderBrush" Value="#ececec"/>
606+
<Setter Property="Background" Value="#ffffff"/>
607+
</Style>
608+
</Button.Resources>
609+
</Button>
601610
</StackPanel>
602611

603612
<TextBlock FontFamily="/Resources/#Segoe Fluent Icons" FontSize="20"

0 commit comments

Comments
 (0)