Skip to content

Commit 67a4352

Browse files
committed
Change hardcoded style in SelectFileManagerWindow
1 parent 2b9cb44 commit 67a4352

File tree

4 files changed

+111
-59
lines changed

4 files changed

+111
-59
lines changed

Flow.Launcher/Resources/CustomControlTemplate.xaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@
55
xmlns:ui="http://schemas.modernwpf.com/2019">
66

77

8+
<!-- Popup Color -->
9+
<Style x:Key="PageBackgroundColor" TargetType="{x:Type Window}">
10+
<Setter Property="Background" Value="{StaticResource Color05B}" />
11+
<Setter Property="Foreground" Value="{StaticResource Color05B}" />
12+
</Style>
13+
814
<!-- Setting Window -->
915
<Style x:Key="PageTitle" TargetType="{x:Type TextBlock}">
1016
<Setter Property="Foreground" Value="{StaticResource Color05B}" />
1117
</Style>
1218
<Style x:Key="Glyph" TargetType="{x:Type TextBlock}">
1319
<Setter Property="Grid.Column" Value="0" />
14-
<Setter Property="Margin" Value="24 0 16 0" />
20+
<Setter Property="Margin" Value="24,0,16,0" />
1521
<Setter Property="VerticalAlignment" Value="Center" />
1622
<Setter Property="FontSize" Value="20" />
1723
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
@@ -20,13 +26,13 @@
2026
<Style x:Key="TabMenu" TargetType="{x:Type TextBlock}">
2127
<Setter Property="FontSize" Value="14" />
2228
<Setter Property="FontFamily" Value="Segoe UI" />
23-
<Setter Property="VerticalAlignment" Value="Center"/>
29+
<Setter Property="VerticalAlignment" Value="Center" />
2430
<Setter Property="Foreground" Value="{StaticResource Color05B}" />
2531
</Style>
2632
<Style x:Key="TabMenuIcon" TargetType="{x:Type TextBlock}">
2733
<Setter Property="Margin" Value="0,0,12,0" />
2834
<Setter Property="FontSize" Value="16" />
29-
<Setter Property="VerticalAlignment" Value="Center"/>
35+
<Setter Property="VerticalAlignment" Value="Center" />
3036
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
3137
<Setter Property="Foreground" Value="{StaticResource Color05B}" />
3238
</Style>

Flow.Launcher/Resources/Dark.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<SolidColorBrush x:Key="Color24B" Color="#9a9a9a" />
3434
<SolidColorBrush x:Key="Color25B" Color="#323232" />
3535
<SolidColorBrush x:Key="ThemeHoverButton" Color="#3c3c3c" />
36+
<SolidColorBrush x:Key="PopuBGColor" Color="#2b2b2b" />
37+
<SolidColorBrush x:Key="PopupTextColor" Color="#cfcfcf" />
38+
<SolidColorBrush x:Key="PopupButtonAreaBGColor" Color="#202020" />
39+
<SolidColorBrush x:Key="PopupButtonAreaBorderColor" Color="#3f3f3f" />
3640
<Color x:Key="Color01">#202020</Color>
3741
<Color x:Key="Color02">#2b2b2b</Color>
3842
<Color x:Key="Color03">#1d1d1d</Color>

Flow.Launcher/Resources/Light.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
<SolidColorBrush x:Key="Color21B" Color="#cccccc" />
3131
<SolidColorBrush x:Key="Color22B" Color="#f0f0f0" />
3232
<SolidColorBrush x:Key="ThemeHoverButton" Color="#f6f6f6" />
33+
<SolidColorBrush x:Key="PopuBGColor" Color="#ffffff" />
34+
<SolidColorBrush x:Key="PopupTextColor" Color="#1b1b1b" />
35+
<SolidColorBrush x:Key="PopupButtonAreaBGColor" Color="#f3f3f3" />
36+
<SolidColorBrush x:Key="PopupButtonAreaBorderColor" Color="#e5e5e5" />
3337
<Color x:Key="Color01">#f3f3f3</Color>
3438
<Color x:Key="Color02">#ffffff</Color>
3539
<Color x:Key="Color03">#e5e5e5</Color>

Flow.Launcher/SelectFileManagerWindow.xaml

Lines changed: 94 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,63 @@
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
88
xmlns:ui="http://schemas.modernwpf.com/2019"
99
Title="{DynamicResource fileManagerWindow}"
10-
Background="#f3f3f3"
10+
Width="600"
11+
Background="{DynamicResource PopuBGColor}"
1112
DataContext="{Binding RelativeSource={RelativeSource Self}}"
13+
Foreground="{DynamicResource PopupTextColor}"
1214
ResizeMode="NoResize"
13-
SizeToContent="WidthAndHeight"
15+
SizeToContent="Height"
1416
WindowStartupLocation="CenterScreen"
1517
mc:Ignorable="d">
16-
<Grid Width="600">
18+
<WindowChrome.WindowChrome>
19+
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
20+
</WindowChrome.WindowChrome>
21+
<!--<Border
22+
Padding="26,26,26,0"
23+
Background="{DynamicResource PopupContentAreaBGColor}"
24+
BorderBrush="{DynamicResource PopupContentAreaBorderColor}"
25+
BorderThickness="0,0,0,1">-->
26+
<Grid>
1727
<Grid.RowDefinitions>
1828
<RowDefinition />
1929
<RowDefinition Height="80" />
2030
</Grid.RowDefinitions>
21-
<Border
22-
Padding="26,26,26,0"
23-
Background="#ffffff"
24-
BorderBrush="#e5e5e5"
25-
BorderThickness="0,0,0,1">
26-
<Grid>
31+
<Grid>
32+
<StackPanel>
2733
<StackPanel>
28-
<StackPanel Grid.Row="0" Margin="0,0,0,12">
34+
<Grid Grid.Row="0">
35+
<Grid.ColumnDefinitions>
36+
<ColumnDefinition Width="Auto" />
37+
<ColumnDefinition Width="*" />
38+
<ColumnDefinition Width="Auto" />
39+
<ColumnDefinition Width="Auto" />
40+
<ColumnDefinition Width="Auto" />
41+
</Grid.ColumnDefinitions>
42+
<Button
43+
Grid.Column="4"
44+
Click="btnCancel_Click"
45+
Style="{StaticResource TitleBarCloseButtonStyle}">
46+
<Path
47+
Width="46"
48+
Height="32"
49+
Data="M 18,11 27,20 M 18,20 27,11"
50+
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
51+
StrokeThickness="1">
52+
<Path.Style>
53+
<Style TargetType="Path">
54+
<Style.Triggers>
55+
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
56+
<Setter Property="Opacity" Value="0.5" />
57+
</DataTrigger>
58+
</Style.Triggers>
59+
</Style>
60+
</Path.Style>
61+
</Path>
62+
</Button>
63+
</Grid>
64+
</StackPanel>
65+
<StackPanel Margin="26,12,26,0">
66+
<StackPanel Grid.Row="1" Margin="0,0,0,12">
2967
<TextBlock
3068
Grid.Column="0"
3169
Margin="0,0,0,0"
@@ -38,14 +76,10 @@
3876
<StackPanel>
3977
<TextBlock
4078
FontSize="14"
41-
Foreground="#1b1b1b"
4279
Text="{DynamicResource fileManager_tips}"
4380
TextAlignment="Left"
4481
TextWrapping="WrapWithOverflow" />
45-
<TextBlock
46-
Margin="0,14,0,0"
47-
FontSize="14"
48-
Foreground="#1b1b1b">
82+
<TextBlock Margin="0,14,0,0" FontSize="14">
4983
<TextBlock Text="{DynamicResource fileManager_tips2}" TextWrapping="WrapWithOverflow" />
5084
</TextBlock>
5185
</StackPanel>
@@ -86,7 +120,7 @@
86120
<Rectangle
87121
Height="1"
88122
Margin="0,20,0,12"
89-
Fill="#cecece" />
123+
Fill="{StaticResource Color03B}" />
90124
<StackPanel
91125
Margin="0,0,0,0"
92126
HorizontalAlignment="Stretch"
@@ -199,46 +233,50 @@
199233
</Grid>
200234
</StackPanel>
201235
</StackPanel>
202-
</Grid>
236+
</StackPanel>
237+
</Grid>
238+
239+
<Border
240+
Grid.Row="2"
241+
Background="{DynamicResource PopupButtonAreaBGColor}"
242+
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
243+
BorderThickness="0,1,0,0">
244+
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
245+
<Button
246+
x:Name="btnCancel"
247+
Width="100"
248+
Height="30"
249+
Margin="0,0,5,0"
250+
Click="btnCancel_Click"
251+
Content="{DynamicResource cancel}" />
252+
<Button
253+
x:Name="btnDone"
254+
Width="100"
255+
Height="30"
256+
Margin="5,0,0,0"
257+
Click="btnDone_Click"
258+
Content="{DynamicResource done}"
259+
ForceCursor="True">
260+
<Button.Style>
261+
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}">
262+
<Style.Triggers>
263+
<DataTrigger Binding="{Binding Text.Length, ElementName=ProfileTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
264+
<Setter Property="IsEnabled" Value="False" />
265+
</DataTrigger>
266+
<DataTrigger Binding="{Binding Text.Length, ElementName=PathTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
267+
<Setter Property="IsEnabled" Value="False" />
268+
</DataTrigger>
269+
<DataTrigger Binding="{Binding Text.Length, ElementName=directoryArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
270+
<Setter Property="IsEnabled" Value="False" />
271+
</DataTrigger>
272+
<DataTrigger Binding="{Binding Text.Length, ElementName=fileArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
273+
<Setter Property="IsEnabled" Value="False" />
274+
</DataTrigger>
275+
</Style.Triggers>
276+
</Style>
277+
</Button.Style>
278+
</Button>
279+
</StackPanel>
203280
</Border>
204-
<StackPanel
205-
Grid.Row="1"
206-
HorizontalAlignment="Center"
207-
Orientation="Horizontal">
208-
<Button
209-
x:Name="btnCancel"
210-
Width="100"
211-
Height="30"
212-
Margin="0,0,5,0"
213-
Click="btnCancel_Click"
214-
Content="{DynamicResource cancel}" />
215-
<Button
216-
x:Name="btnDone"
217-
Width="100"
218-
Height="30"
219-
Margin="5,0,0,0"
220-
Click="btnDone_Click"
221-
Content="{DynamicResource done}"
222-
ForceCursor="True">
223-
<Button.Style>
224-
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}">
225-
<Style.Triggers>
226-
<DataTrigger Binding="{Binding Text.Length, ElementName=ProfileTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
227-
<Setter Property="IsEnabled" Value="False" />
228-
</DataTrigger>
229-
<DataTrigger Binding="{Binding Text.Length, ElementName=PathTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
230-
<Setter Property="IsEnabled" Value="False" />
231-
</DataTrigger>
232-
<DataTrigger Binding="{Binding Text.Length, ElementName=directoryArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
233-
<Setter Property="IsEnabled" Value="False" />
234-
</DataTrigger>
235-
<DataTrigger Binding="{Binding Text.Length, ElementName=fileArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
236-
<Setter Property="IsEnabled" Value="False" />
237-
</DataTrigger>
238-
</Style.Triggers>
239-
</Style>
240-
</Button.Style>
241-
</Button>
242-
</StackPanel>
243281
</Grid>
244282
</Window>

0 commit comments

Comments
 (0)