Skip to content

Commit 1b7c9d3

Browse files
committed
Add Darkmode item in setting window
Darkmode Actionkewords popup
1 parent dbd8d85 commit 1b7c9d3

File tree

5 files changed

+152
-73
lines changed

5 files changed

+152
-73
lines changed

Flow.Launcher/ActionKeywords.xaml

Lines changed: 120 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,136 @@
1-
<Window x:Class="Flow.Launcher.ActionKeywords"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
Title="{DynamicResource actionKeywordsTitle}"
5-
Icon="Images\app.png"
6-
ResizeMode="NoResize"
7-
Loaded="ActionKeyword_OnLoaded"
8-
WindowStartupLocation="CenterScreen"
9-
Height="365" Width="450" Background="#F3F3F3" BorderBrush="#cecece">
1+
<Window
2+
x:Class="Flow.Launcher.ActionKeywords"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
Title="{DynamicResource actionKeywordsTitle}"
6+
Width="450"
7+
Height="345"
8+
Background="{DynamicResource PopuBGColor}"
9+
Foreground="{DynamicResource PopupTextColor}"
10+
Icon="Images\app.png"
11+
Loaded="ActionKeyword_OnLoaded"
12+
ResizeMode="NoResize"
13+
WindowStartupLocation="CenterScreen">
14+
<WindowChrome.WindowChrome>
15+
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
16+
</WindowChrome.WindowChrome>
1017
<Grid>
1118
<Grid.RowDefinitions>
1219
<RowDefinition />
13-
<RowDefinition Height="80"/>
20+
<RowDefinition Height="80" />
1421
</Grid.RowDefinitions>
15-
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
16-
<Grid>
22+
<Grid>
23+
<StackPanel Grid.Row="0">
1724
<StackPanel>
18-
<StackPanel Grid.Row="0" Margin="0 0 0 12">
19-
<TextBlock Grid.Column="0" Text="{DynamicResource actionKeywordsTitle}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
20-
Margin="0 0 0 0" />
25+
<Grid>
26+
<Grid.ColumnDefinitions>
27+
<ColumnDefinition Width="Auto" />
28+
<ColumnDefinition Width="*" />
29+
<ColumnDefinition Width="Auto" />
30+
<ColumnDefinition Width="Auto" />
31+
<ColumnDefinition Width="Auto" />
32+
</Grid.ColumnDefinitions>
33+
<Button
34+
Grid.Column="4"
35+
Click="BtnCancel_OnClick"
36+
Style="{StaticResource TitleBarCloseButtonStyle}">
37+
<Path
38+
Width="46"
39+
Height="32"
40+
Data="M 18,11 27,20 M 18,20 27,11"
41+
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
42+
StrokeThickness="1">
43+
<Path.Style>
44+
<Style TargetType="Path">
45+
<Style.Triggers>
46+
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
47+
<Setter Property="Opacity" Value="0.5" />
48+
</DataTrigger>
49+
</Style.Triggers>
50+
</Style>
51+
</Path.Style>
52+
</Path>
53+
</Button>
54+
</Grid>
55+
</StackPanel>
56+
<StackPanel Margin="26,12,26,0">
57+
<StackPanel Grid.Row="0" Margin="0,0,0,12">
58+
<TextBlock
59+
Grid.Column="0"
60+
Margin="0,0,0,0"
61+
FontFamily="Segoe UI"
62+
FontSize="20"
63+
FontWeight="SemiBold"
64+
Text="{DynamicResource actionKeywordsTitle}"
65+
TextAlignment="Left" />
2166
</StackPanel>
2267
<StackPanel>
23-
<TextBlock
24-
Text="{DynamicResource actionkeyword_tips}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
68+
<TextBlock
69+
FontSize="14"
70+
Text="{DynamicResource actionkeyword_tips}"
71+
TextAlignment="Left"
72+
TextWrapping="WrapWithOverflow" />
2573
</StackPanel>
2674

27-
<StackPanel Orientation="Horizontal" Margin="0 18 0 0">
28-
<TextBlock FontSize="14" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"
29-
HorizontalAlignment="Left" Text="{DynamicResource currentActionKeywords}" />
30-
<TextBlock x:Name="tbOldActionKeyword" Grid.Row="0" Grid.Column="1" Margin="14 10 10 10" FontSize="14"
31-
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="SemiBold"/>
75+
<StackPanel Margin="0,18,0,0" Orientation="Horizontal">
76+
<TextBlock
77+
Grid.Row="0"
78+
Grid.Column="1"
79+
HorizontalAlignment="Left"
80+
VerticalAlignment="Center"
81+
FontSize="14"
82+
Text="{DynamicResource currentActionKeywords}" />
83+
<TextBlock
84+
x:Name="tbOldActionKeyword"
85+
Grid.Row="0"
86+
Grid.Column="1"
87+
Margin="14,10,10,10"
88+
HorizontalAlignment="Left"
89+
VerticalAlignment="Center"
90+
FontSize="14"
91+
FontWeight="SemiBold"
92+
Foreground="{DynamicResource Color05B}" />
3293
</StackPanel>
3394
<StackPanel Orientation="Horizontal">
34-
<TextBlock FontSize="14" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"
35-
HorizontalAlignment="Left" Text="{DynamicResource newActionKeyword}" />
36-
37-
<TextBox x:Name="tbAction" Margin="10 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
38-
95+
<TextBlock
96+
Grid.Row="1"
97+
Grid.Column="1"
98+
HorizontalAlignment="Left"
99+
VerticalAlignment="Center"
100+
FontSize="14"
101+
Text="{DynamicResource newActionKeyword}" />
102+
<TextBox
103+
x:Name="tbAction"
104+
Width="105"
105+
Margin="10,10,15,10"
106+
HorizontalAlignment="Left"
107+
VerticalAlignment="Center" />
39108
</StackPanel>
40109
</StackPanel>
41-
</Grid>
42-
</Border>
43-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
44-
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="10 0 5 0" Width="100" Height="30"
45-
Content="{DynamicResource cancel}" />
46-
<Button x:Name="btnDone" Margin="5 0 10 0" Width="100" Height="30" Click="btnDone_OnClick">
47-
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
48-
</Button>
49-
</StackPanel>
50-
</Grid>
51-
<!--
52-
<Grid.RowDefinitions>
53-
<RowDefinition />
54-
<RowDefinition Height="60"/>
55-
<RowDefinition />
56-
<RowDefinition />
57-
</Grid.RowDefinitions>
58-
<Grid.ColumnDefinitions>
59-
<ColumnDefinition Width="150" />
60-
<ColumnDefinition />
61-
</Grid.ColumnDefinitions>
62-
<TextBlock FontSize="14" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"
63-
HorizontalAlignment="Left" Text="{DynamicResource currentActionKeywords}" />
64-
<TextBlock x:Name="tbOldActionKeyword" Grid.Row="0" Grid.Column="1" Margin="170 10 10 10" FontSize="14"
65-
VerticalAlignment="Center" HorizontalAlignment="Left" />
66-
67-
<TextBlock FontSize="14" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"
68-
HorizontalAlignment="Left" Text="{DynamicResource newActionKeyword}" />
69-
<StackPanel Grid.Row="1" Orientation="Horizontal" Grid.Column="1">
70-
<TextBox x:Name="tbAction" Margin="170 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
71-
</StackPanel>
72-
73-
<TextBlock Grid.Row="2" Grid.ColumnSpan="1" Grid.Column="1" Foreground="Gray"
74-
Text="{DynamicResource actionkeyword_tips}" />
75-
76-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="1">
77-
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="10 0 10 0" Width="80" Height="30"
110+
</StackPanel>
111+
</Grid>
112+
<Border
113+
Grid.Row="1"
114+
Background="{DynamicResource PopupButtonAreaBGColor}"
115+
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
116+
BorderThickness="0,1,0,0">
117+
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
118+
<Button
119+
x:Name="btnCancel"
120+
Width="100"
121+
Height="30"
122+
Margin="10,0,5,0"
123+
Click="BtnCancel_OnClick"
78124
Content="{DynamicResource cancel}" />
79-
<Button x:Name="btnDone" Margin="10 0 10 0" Width="80" Height="30" Click="btnDone_OnClick">
80-
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
81-
</Button>
82-
</StackPanel>
125+
<Button
126+
x:Name="btnDone"
127+
Width="100"
128+
Height="30"
129+
Margin="5,0,10,0"
130+
Click="btnDone_OnClick">
131+
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
132+
</Button>
133+
</StackPanel>
134+
</Border>
83135
</Grid>
84-
-->
85136
</Window>

Flow.Launcher/Languages/en.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
<system:String x:Key="theme_load_failure_parse_error">Fail to load theme {0}, fallback to default theme</system:String>
8484
<system:String x:Key="ThemeFolder">Theme Folder</system:String>
8585
<system:String x:Key="OpenThemeFolder">Open Theme Folder</system:String>
86+
<system:String x:Key="DarkMode">Dark Mode</system:String>
87+
<system:String x:Key="DarkModeDefault">System Default</system:String>
88+
<system:String x:Key="DarkModeLight">Light</system:String>
89+
<system:String x:Key="DarkModeDark">Dark</system:String>
8690

8791
<!-- Setting Hotkey -->
8892
<system:String x:Key="hotkey">Hotkey</system:String>

Flow.Launcher/Resources/Dark.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
<SolidColorBrush x:Key="CustomNumberBoxBG" Color="#292929" />
4040
<SolidColorBrush x:Key="PluginInfoColor" Color="#878787" />
4141

42+
<SolidColorBrush x:Key="BasicLabelColor" Color="#ffffff" />
43+
<SolidColorBrush x:Key="BasicSeparatorColor" Color="#cecece" />
44+
<SolidColorBrush x:Key="BasicLineColor" Color="#cecece" />
45+
4246
<SolidColorBrush x:Key="ThemeHoverButton" Color="#3c3c3c" />
4347
<SolidColorBrush x:Key="PopuBGColor" Color="#202020" />
4448
<SolidColorBrush x:Key="PopupTextColor" Color="#cfcfcf" />

Flow.Launcher/Resources/Light.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<SolidColorBrush x:Key="NumberBoxColor26B" Color="#1b1b1b" />
3636
<SolidColorBrush x:Key="CustomNumberBoxBG" Color="#fdfdfd" />
3737
<SolidColorBrush x:Key="PluginInfoColor" Color="#8f8f8f" />
38+
<SolidColorBrush x:Key="BasicLabelColor" Color="#1b1b1b" />
3839

3940
<SolidColorBrush x:Key="ThemeHoverButton" Color="#f6f6f6" />
4041
<SolidColorBrush x:Key="PopuBGColor" Color="#ffffff" />

Flow.Launcher/SettingWindow.xaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,9 +1354,9 @@
13541354
Height="32"
13551355
Margin="8,0,6,0"
13561356
VerticalAlignment="Center"
1357-
RenderOptions.BitmapScalingMode="HighQuality"
1358-
Source="{Binding IcoPath, IsAsync=True}"
1359-
Stretch="Uniform" />
1357+
RenderOptions.BitmapScalingMode="HighQuality"
1358+
Source="{Binding IcoPath, IsAsync=True}"
1359+
Stretch="Uniform" />
13601360
</StackPanel>
13611361
<StackPanel
13621362
Grid.Column="1"
@@ -1862,7 +1862,26 @@
18621862
</Border>
18631863

18641864
<StackPanel>
1865-
<Border Margin="0,12,0,18" Style="{DynamicResource SettingGroupBox}">
1865+
<Border Margin="0,12,0,12" Style="{DynamicResource SettingGroupBox}">
1866+
<ItemsControl Style="{StaticResource SettingGrid}">
1867+
<StackPanel Style="{StaticResource TextPanel}">
1868+
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource DarkMode}" />
1869+
</StackPanel>
1870+
<ComboBox
1871+
Grid.Column="2"
1872+
MaxWidth="200"
1873+
Margin="10,0,18,0"
1874+
DisplayMemberPath="Display"
1875+
ItemsSource="{Binding LastQueryModes}"
1876+
SelectedValue="{Binding Settings.LastQueryMode}"
1877+
SelectedValuePath="Value" />
1878+
<TextBlock Style="{StaticResource Glyph}">
1879+
&#xe708;
1880+
</TextBlock>
1881+
</ItemsControl>
1882+
</Border>
1883+
1884+
<Border Margin="0,0,0,18" Style="{DynamicResource SettingGroupBox}">
18661885
<ItemsControl Style="{StaticResource SettingGrid}">
18671886
<StackPanel Style="{StaticResource TextPanel}">
18681887
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource ThemeFolder}" />

0 commit comments

Comments
 (0)