Skip to content

Commit 3a7f595

Browse files
committed
- Adjust Themes / Preview Margin
- Fix GridSplitter Margin
1 parent 0d9f207 commit 3a7f595

File tree

9 files changed

+741
-25
lines changed

9 files changed

+741
-25
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,18 @@
441441
</StackPanel>
442442
<GridSplitter
443443
Grid.Column="1"
444-
Width="{Binding PreviewVisible, Converter={StaticResource SplitterConverter}}"
445444
Margin="0"
446445
HorizontalAlignment="Center"
447446
VerticalAlignment="Stretch"
448447
Background="Transparent"
449-
ShowsPreview="True" />
448+
ShowsPreview="True"
449+
Visibility="{Binding PreviewVisible, Converter={StaticResource BoolToVisibilityConverter}}">
450+
<GridSplitter.Template>
451+
<ControlTemplate TargetType="{x:Type GridSplitter}">
452+
<Border Style="{DynamicResource PreviewBorderStyle}" />
453+
</ControlTemplate>
454+
</GridSplitter.Template>
455+
</GridSplitter>
450456
<Grid
451457
x:Name="Preview"
452458
Grid.Column="2"
@@ -457,10 +463,9 @@
457463
MinHeight="380"
458464
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
459465
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
460-
Style="{DynamicResource PreviewBorderStyle}"
461466
Visibility="{Binding ShowDefaultPreview}">
462467
<Grid
463-
Margin="20 0 10 0"
468+
Margin="0 0 10 5"
464469
VerticalAlignment="Stretch"
465470
Background="Transparent">
466471
<Grid.RowDefinitions>
@@ -532,9 +537,9 @@
532537
<Border
533538
MinHeight="380"
534539
MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}"
540+
Padding="0 0 10 10"
535541
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
536542
DataContext="{Binding SelectedItem, ElementName=ResultListBox}"
537-
Style="{DynamicResource PreviewBorderStyle}"
538543
Visibility="{Binding ShowCustomizedPreview}">
539544
<ContentControl Content="{Binding Result.PreviewPanel.Value}" />
540545
</Border>

Flow.Launcher/Resources/SettingWindowStyle.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
</Setter>
5656
</Style>
5757
<Style x:Key="ThemeList" TargetType="ListBoxItem">
58-
<Setter Property="Background" Value="Red" />
5958
<Setter Property="HorizontalContentAlignment" Value="Left" />
6059
<Setter Property="HorizontalAlignment" Value="Left" />
6160
<Setter Property="Padding" Value="0" />

Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,19 +385,19 @@
385385
Icon="&#xe790;">
386386
<cc:ExCard.SideContent>
387387
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
388-
<TextBlock Text="{Binding SelectedTheme.Name}" />
389388
<ui:FontIcon
390-
Margin="8 0 0 0"
389+
Margin="0 0 8 0"
391390
VerticalAlignment="Center"
392391
FontSize="12"
393392
Glyph="&#xED66;"
394393
Visibility="{Binding SelectedTheme.IsDark, Converter={StaticResource BoolToVisibilityConverter}}" />
395394
<ui:FontIcon
396-
Margin="8 0 0 0"
395+
Margin="0 0 8 0"
397396
VerticalAlignment="Center"
398397
FontSize="12"
399398
Glyph="&#xEB42;"
400399
Visibility="{Binding SelectedTheme.IsBlur, Converter={StaticResource BoolToVisibilityConverter}}" />
400+
<TextBlock Text="{Binding SelectedTheme.Name}" />
401401
</StackPanel>
402402
</cc:ExCard.SideContent>
403403
<ListBox

Flow.Launcher/Themes/Base.xaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
<Style.Triggers>
131131
<DataTrigger Binding="{Binding ElementName=DateBox, Path=Visibility}" Value="Visible">
132132
<Setter Property="FontSize" Value="14" />
133-
<Setter Property="Margin" Value="0,0,0,0" />
133+
<Setter Property="Margin" Value="0 0 0 0" />
134134
</DataTrigger>
135135
</Style.Triggers>
136136
</Style>
@@ -143,7 +143,7 @@
143143
<Style.Triggers>
144144
<DataTrigger Binding="{Binding ElementName=ClockBox, Path=Visibility}" Value="Visible">
145145
<Setter Property="FontSize" Value="14" />
146-
<Setter Property="Margin" Value="0,0,0,3" />
146+
<Setter Property="Margin" Value="0 0 0 3" />
147147
</DataTrigger>
148148
</Style.Triggers>
149149
</Style>
@@ -409,10 +409,24 @@
409409
</Style>
410410
<Style x:Key="BasePreviewBorderStyle" TargetType="{x:Type Border}">
411411
<Setter Property="BorderThickness" Value="1 0 0 0" />
412+
<Setter Property="Width" Value="5" />
412413
<Setter Property="BorderBrush" Value="#FFEAEAEA" />
413414
<Setter Property="Background" Value="Transparent" />
414415
<Setter Property="Margin" Value="0 0 10 10" />
416+
<Setter Property="Background" Value="Transparent" />
417+
<Style.Triggers>
418+
<MultiDataTrigger>
419+
<MultiDataTrigger.Conditions>
420+
<Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" />
421+
</MultiDataTrigger.Conditions>
422+
<MultiDataTrigger.Setters>
423+
<Setter Property="Height" Value="0" />
424+
<Setter Property="Margin" Value="0" />
425+
</MultiDataTrigger.Setters>
426+
</MultiDataTrigger>
427+
</Style.Triggers>
415428
</Style>
429+
416430
<Style x:Key="BasePreviewGlyph" TargetType="{x:Type TextBlock}">
417431
<Setter Property="Foreground" Value="#555555" />
418432
<Setter Property="VerticalAlignment" Value="Center" />
@@ -437,7 +451,7 @@
437451
<Style x:Key="PreviewSep" TargetType="{x:Type Separator}">
438452
<Setter Property="Visibility" Value="Visible" />
439453
<Setter Property="Background" Value="{Binding ElementName=MiddleSeparator, Path=Fill}" />
440-
<Setter Property="Margin" Value="0 15 0 5" />
454+
<Setter Property="Margin" Value="0 15 5 5" />
441455
<Style.Triggers>
442456
<DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
443457
<Setter Property="Visibility" Value="Collapsed" />
@@ -449,6 +463,7 @@
449463
BasedOn="{StaticResource BasePreviewBorderStyle}"
450464
TargetType="{x:Type Border}">
451465
<Setter Property="BorderBrush" Value="Gray" />
466+
452467
</Style>
453468

454469
<Style x:Key="PreviewArea" TargetType="{x:Type Grid}">
@@ -535,7 +550,7 @@
535550
<Setter Property="Foreground" Value="#8f8f8f" />
536551
<Setter Property="FontSize" Value="12" />
537552
<Setter Property="FontWeight" Value="Normal" />
538-
<Setter Property="Margin" Value="0 6 0 10" />
553+
<Setter Property="Margin" Value="5 6 0 10" />
539554
<Setter Property="HorizontalAlignment" Value="Stretch" />
540555
<Setter Property="LineHeight" Value="18" />
541556
<Setter Property="TextAlignment" Value="Left" />
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
<ResourceDictionary
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:system="clr-namespace:System;assembly=mscorlib">
5+
<ResourceDictionary.MergedDictionaries>
6+
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
7+
</ResourceDictionary.MergedDictionaries>
8+
<Thickness x:Key="ResultMargin">0 0 0 8</Thickness>
9+
<Style
10+
x:Key="ItemGlyph"
11+
BasedOn="{StaticResource BaseGlyphStyle}"
12+
TargetType="{x:Type TextBlock}">
13+
<Setter Property="Foreground" Value="#ebebeb" />
14+
</Style>
15+
<Style
16+
x:Key="QueryBoxStyle"
17+
BasedOn="{StaticResource BaseQueryBoxStyle}"
18+
TargetType="{x:Type TextBox}">
19+
<Setter Property="Foreground" Value="#ebebeb" />
20+
<Setter Property="Background" Value="Transparent" />
21+
</Style>
22+
23+
<Style
24+
x:Key="QuerySuggestionBoxStyle"
25+
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
26+
TargetType="{x:Type TextBox}">
27+
<Setter Property="Foreground" Value="#ebebeb" />
28+
<Setter Property="Opacity" Value="0.2" />
29+
</Style>
30+
31+
<Style
32+
x:Key="WindowBorderStyle"
33+
BasedOn="{StaticResource BaseWindowBorderStyle}"
34+
TargetType="{x:Type Border}">
35+
<Setter Property="CornerRadius" Value="5" />
36+
<Setter Property="BorderThickness" Value="1,1,0,0" />
37+
<Setter Property="BorderBrush" Value="#666666" />
38+
<Setter Property="Background">
39+
<Setter.Value>
40+
<SolidColorBrush Opacity="0.95" Color="#333333" />
41+
</Setter.Value>
42+
</Setter>
43+
</Style>
44+
45+
<Style
46+
x:Key="WindowStyle"
47+
BasedOn="{StaticResource BaseWindowStyle}"
48+
TargetType="{x:Type Window}">
49+
<Setter Property="Background">
50+
<Setter.Value>
51+
<SolidColorBrush Opacity="0.5" Color="White" />
52+
</Setter.Value>
53+
</Setter>
54+
</Style>
55+
56+
<Style
57+
x:Key="PendingLineStyle"
58+
BasedOn="{StaticResource BasePendingLineStyle}"
59+
TargetType="{x:Type Line}" />
60+
61+
<!-- Item Style -->
62+
<Style
63+
x:Key="ItemTitleStyle"
64+
BasedOn="{StaticResource BaseItemTitleStyle}"
65+
TargetType="{x:Type TextBlock}">
66+
<Setter Property="Foreground" Value="#ebebeb" />
67+
</Style>
68+
<Style
69+
x:Key="ItemSubTitleStyle"
70+
BasedOn="{StaticResource BaseItemSubTitleStyle}"
71+
TargetType="{x:Type TextBlock}">
72+
<Setter Property="Foreground" Value="#787878" />
73+
</Style>
74+
<Style
75+
x:Key="ItemTitleSelectedStyle"
76+
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
77+
TargetType="{x:Type TextBlock}">
78+
<Setter Property="Foreground" Value="#ffffff" />
79+
</Style>
80+
<Style
81+
x:Key="ItemSubTitleSelectedStyle"
82+
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
83+
TargetType="{x:Type TextBlock}">
84+
<Setter Property="Foreground" Value="#949494" />
85+
</Style>
86+
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#545454</SolidColorBrush>
87+
88+
<!-- button style in the middle of the scrollbar -->
89+
<Style
90+
x:Key="ThumbStyle"
91+
BasedOn="{StaticResource BaseThumbStyle}"
92+
TargetType="{x:Type Thumb}">
93+
<Setter Property="Template">
94+
<Setter.Value>
95+
<ControlTemplate TargetType="{x:Type Thumb}">
96+
<Border
97+
Background="#525252"
98+
BorderBrush="Transparent"
99+
BorderThickness="0"
100+
CornerRadius="2"
101+
DockPanel.Dock="Right" />
102+
</ControlTemplate>
103+
</Setter.Value>
104+
</Setter>
105+
</Style>
106+
<Style
107+
x:Key="ScrollBarStyle"
108+
BasedOn="{StaticResource BaseScrollBarStyle}"
109+
TargetType="{x:Type ScrollBar}">
110+
<Setter Property="Background" Value="#a0a0a0" />
111+
</Style>
112+
<Style
113+
x:Key="SearchIconStyle"
114+
BasedOn="{StaticResource BaseSearchIconStyle}"
115+
TargetType="{x:Type Path}">
116+
<Setter Property="Fill" Value="#FFFFFF" />
117+
<Setter Property="Width" Value="32" />
118+
<Setter Property="Height" Value="32" />
119+
<Setter Property="Opacity" Value="0.2" />
120+
</Style>
121+
<Style
122+
x:Key="SeparatorStyle"
123+
BasedOn="{StaticResource BaseSeparatorStyle}"
124+
TargetType="{x:Type Rectangle}">
125+
<Setter Property="Fill" Value="#474747" />
126+
<Setter Property="Height" Value="1" />
127+
<Setter Property="Margin" Value="0,0,0,8" />
128+
</Style>
129+
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
130+
<Setter Property="FontSize" Value="14" />
131+
<Setter Property="Foreground" Value="#787878" />
132+
</Style>
133+
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
134+
<Setter Property="FontSize" Value="14" />
135+
<Setter Property="Foreground" Value="#787878" />
136+
</Style>
137+
<Style
138+
x:Key="ClockBox"
139+
BasedOn="{StaticResource BaseClockBox}"
140+
TargetType="{x:Type TextBlock}">
141+
<Setter Property="Foreground" Value="#787878" />
142+
</Style>
143+
<Style
144+
x:Key="DateBox"
145+
BasedOn="{StaticResource BaseDateBox}"
146+
TargetType="{x:Type TextBlock}">
147+
<Setter Property="Foreground" Value="#787878" />
148+
</Style>
149+
<Style
150+
x:Key="PreviewBorderStyle"
151+
BasedOn="{StaticResource BasePreviewBorderStyle}"
152+
TargetType="{x:Type Border}">
153+
<Setter Property="BorderBrush" Value="#474747" />
154+
</Style>
155+
156+
<Style
157+
x:Key="PreviewItemTitleStyle"
158+
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
159+
TargetType="{x:Type TextBlock}">
160+
<Setter Property="Foreground" Value="#ebebeb" />
161+
</Style>
162+
<Style
163+
x:Key="PreviewItemSubTitleStyle"
164+
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
165+
TargetType="{x:Type TextBlock}">
166+
<Setter Property="Foreground" Value="#787878" />
167+
</Style>
168+
<Style
169+
x:Key="PreviewGlyph"
170+
BasedOn="{StaticResource BasePreviewGlyph}"
171+
TargetType="{x:Type TextBlock}">
172+
<Setter Property="Foreground" Value="#ebebeb" />
173+
</Style>
174+
</ResourceDictionary>

0 commit comments

Comments
 (0)