Skip to content

Commit bb7b0cd

Browse files
committed
- Add Magnifier in Win 11 Light/Dark Theme
- Remove Scrollbar Reserve Space - Now scrollbar front, selected item background is behind. When I first fix the code, it has design issue some case. - Adjust Setting Window - Adjust Metro Server Theme - Fix Darker Selected Background - Fix Win10light Seprator
1 parent 9d10b7f commit bb7b0cd

File tree

9 files changed

+84
-79
lines changed

9 files changed

+84
-79
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<TextBox x:Name="QueryTextSuggestionBox"
7070
Style="{DynamicResource QuerySuggestionBoxStyle}"
7171
IsEnabled="False"
72-
Margin="16,0,56,0">
72+
Margin="16,0,66,0">
7373
<TextBox.Text>
7474
<MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}">
7575
<Binding ElementName="QueryTextBox" Path="Text"/>
@@ -84,7 +84,7 @@
8484
AllowDrop="True"
8585
Visibility="Visible"
8686
Background="Transparent"
87-
Margin="16,0,56,0">
87+
Margin="16,0,66,0">
8888
<TextBox.ContextMenu>
8989
<ContextMenu>
9090
<MenuItem Command="ApplicationCommands.Cut"/>

Flow.Launcher/ResultListBox.xaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</ControlTemplate>
3131
</Button.Template>
3232
<Button.Content>
33-
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0"
33+
<Grid HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="0"
3434
Cursor="Hand" UseLayoutRounding="False">
3535
<Grid.Resources>
3636
<converter:HighlightTextConverter x:Key="HighlightTextConverter"/>
@@ -59,9 +59,9 @@
5959
<Image x:Name="ImageIcon" Width="32" Height="32" HorizontalAlignment="Center" Source="{Binding Image}" Visibility="{Binding ShowIcon}" Margin="0 0 0 0"/>
6060
</Border>
6161
<Border BorderThickness="0" BorderBrush="Transparent" Margin="14 0 0 0">
62-
<TextBlock Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Glyph.Glyph}" FontFamily="{Binding Glyph.FontFamily}" FontSize="24" Visibility="{Binding ShowGlyph}" Margin="12 0 0 0" />
62+
<TextBlock Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Glyph.Glyph}" FontFamily="{Binding Glyph.FontFamily}" FontSize="24" Visibility="{Binding ShowGlyph}" Margin="12 0 0 0" Padding="0 0 12 0"/>
6363
</Border>
64-
<Grid Margin="6 0 6 0" Grid.Column="1" HorizontalAlignment="Stretch">
64+
<Grid Margin="6 0 10 0" Grid.Column="1" HorizontalAlignment="Stretch">
6565
<Grid.RowDefinitions>
6666
<RowDefinition />
6767
<RowDefinition Height="Auto" x:Name="SubTitleRowDefinition" />
@@ -86,11 +86,13 @@
8686
</MultiBinding>
8787
</vm:ResultsViewModel.FormattedText>
8888
</TextBlock>
89+
8990
</Grid>
91+
9092
</Grid>
9193
</Button.Content>
9294
</Button>
93-
<!-- a result item height is 50 including margin -->
95+
<!-- a result item height is 52 including margin -->
9496
<DataTemplate.Triggers>
9597
<DataTrigger
9698
Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"

Flow.Launcher/SettingWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
<Canvas Style="{DynamicResource SearchIconPosition}">
269269
<Path Data="{DynamicResource SearchIconImg}" Style="{DynamicResource SearchIconStyle}" Margin="0" Stretch="Fill"/>
270270
</Canvas>
271-
<Grid Height="58" Margin="0 30 0 0">
271+
<Grid Height="58" Margin="0 28 0 0">
272272
<Rectangle Width="Auto" HorizontalAlignment="Stretch" Style="{DynamicResource SeparatorStyle}" Visibility="visible"/>
273273
</Grid>
274274
<ContentControl Grid.Row="1">

Flow.Launcher/Themes/Base.xaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@
9090
<Setter Property="FontSize" Value="13" />
9191
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
9292
</Style>
93-
94-
9593
<Style x:Key="BaseItemImageSelectedStyle" TargetType="{x:Type Image}" >
9694
</Style>
9795

@@ -100,11 +98,26 @@
10098
<Setter Property="Background" Value="Transparent"/>
10199
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
102100
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
101+
<Setter Property="Margin" Value="0 0 0 0" />
102+
<Setter Property="Padding" Value="0 0 0 0" />
103103
<Setter Property="Template">
104104
<Setter.Value>
105105
<ControlTemplate TargetType="ListBox">
106-
<!-- <ScrollViewer Focusable="false" Template="{DynamicResource ScrollViewerControlTemplate}">-->
107106
<ScrollViewer Focusable="false" Template="{DynamicResource ScrollViewerControlTemplate}">
107+
<ScrollViewer.Style>
108+
<Style TargetType="ScrollViewer">
109+
<Style.Triggers>
110+
<Trigger Property="ComputedVerticalScrollBarVisibility" Value="Visible">
111+
<Setter Property="Margin" Value="0 0 0 0" />
112+
<Setter Property="Padding" Value="0 0 0 0" />
113+
</Trigger>
114+
<Trigger Property="ComputedVerticalScrollBarVisibility" Value="Collapsed">
115+
<Setter Property="Margin" Value="0 0 0 0" />
116+
<Setter Property="Padding" Value="0 0 0 0" />
117+
</Trigger>
118+
</Style.Triggers>
119+
</Style>
120+
</ScrollViewer.Style>
108121
<VirtualizingStackPanel IsItemsHost="True" />
109122
</ScrollViewer>
110123
</ControlTemplate>
@@ -135,7 +148,8 @@
135148
<ScrollBar x:Name="PART_VerticalScrollBar"
136149
AutomationProperties.AutomationId="VerticalScrollBar"
137150
Cursor="Arrow"
138-
Grid.Column="1"
151+
Grid.Column="0"
152+
HorizontalAlignment="Right"
139153
Margin="0 0 0 0"
140154
Maximum="{TemplateBinding ScrollableHeight}"
141155
Minimum="0"
@@ -144,7 +158,6 @@
144158
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
145159
ViewportSize="{TemplateBinding ViewportHeight}"
146160
Style="{DynamicResource ScrollBarStyle}" />
147-
148161
</Grid>
149162
</ControlTemplate>
150163

Flow.Launcher/Themes/Metro Server.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
</ResourceDictionary.MergedDictionaries>
55
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
66
<Setter Property="Foreground" Value="#FFFFFF" />
7+
<Setter Property="Background" Value="#001e4e"></Setter>
78
</Style>
89

910
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
1011
<Setter Property="Foreground" Value="#FFFFFF" />
12+
<Setter Property="Background" Value="#001e4e"></Setter>
13+
<Setter Property="Opacity" Value="0.4"></Setter>
1114
</Style>
1215

1316
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
@@ -22,16 +25,20 @@
2225
</Style>
2326
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
2427
<Setter Property="Foreground" Value="#c2c2c2"></Setter>
28+
<Setter Property="FontSize" Value="12" />
2529
</Style>
2630
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
2731
<Setter Property="Foreground" Value="#f5f5f5" />
2832
</Style>
2933
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
3034
<Setter Property="Foreground" Value="#c2c2c2" />
35+
<Setter Property="FontSize" Value="12" />
3136
</Style>
3237
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#006ac1</SolidColorBrush>
3338
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
3439
</Style>
3540
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
3641
</Style>
42+
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
43+
</Style>
3744
</ResourceDictionary>

Flow.Launcher/Themes/Pink.xaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
66
<Setter Property="Background" Value="#1f1d1f"/>
77
<Setter Property="Foreground" Value="#cc1081" />
8+
<Setter Property="CaretBrush" Value="#cc1081" />
89
</Style>
910

1011
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
1112
<Setter Property="Background" Value="#1f1d1f"/>
12-
<Setter Property="Foreground" Value="#cc1081" />
13+
<Setter Property="Foreground" Value="#71114b" />
1314
</Style>
1415

1516
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
@@ -23,24 +24,26 @@
2324
</Style>
2425
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
2526
<Setter Property="Foreground" Value="#c2c2c2"></Setter>
27+
<Setter Property="Opacity" Value="0.5"></Setter>
2628
</Style>
2729
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
2830
<Setter Property="Foreground" Value="#f5f5f5" />
2931
</Style>
3032
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}">
31-
<Setter Property="Foreground" Value="#c2c2c2" />
33+
<Setter Property="Foreground" Value="#ed92c9" />
3234
</Style>
3335
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#cc1081</SolidColorBrush>
3436
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
3537
<Setter Property="Template">
3638
<Setter.Value>
3739
<ControlTemplate TargetType="{x:Type Thumb}">
38-
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#cc1081" BorderBrush="Transparent" BorderThickness="0" />
40+
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#e564b1" BorderBrush="Transparent" BorderThickness="0" />
3941
</ControlTemplate>
4042
</Setter.Value>
4143
</Setter>
4244
</Style>
43-
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}"></Style>
45+
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
46+
</Style>
4447
<Geometry x:Key="SearchIconImg">F1 M20,20z M0,0z M14.75,1A5.24,5.24,0,0,0,10,4A5.24,5.24,0,0,0,0,6.25C0,11.75 10,19 10,19 10,19 20,11.75 20,6.25A5.25,5.25,0,0,0,14.75,1z</Geometry>
4548

4649
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
@@ -55,5 +58,8 @@
5558
<Setter Property="Width" Value="28" />
5659
<Setter Property="Height" Value="28" />
5760
</Style>
58-
61+
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
62+
<Setter Property="FontSize" Value="14" />
63+
<Setter Property="Foreground" Value="#ed92c9" />
64+
</Style>
5965
</ResourceDictionary>

Flow.Launcher/Themes/Win10Light.xaml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@
126126
<ScrollBar x:Name="PART_VerticalScrollBar"
127127
AutomationProperties.AutomationId="VerticalScrollBar"
128128
Cursor="Arrow"
129-
Grid.Column="1"
129+
Grid.Column="0"
130+
HorizontalAlignment="Right"
130131
Margin="0 0 0 0"
131132
Maximum="{TemplateBinding ScrollableHeight}"
132133
Minimum="0"
@@ -172,16 +173,7 @@
172173
</Setter.Value>
173174
</Setter>
174175
</Style>
175-
<Style x:Key="BaseSeparatorStyle" TargetType="Rectangle">
176-
<Setter Property="Visibility" Value="Collapsed" />
177-
<Style.Triggers>
178-
<DataTrigger Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Visible">
179-
<Setter Property="Visibility" Value="Visible" />
180-
<!-- Top Margin for When Open List, -->
181-
<Setter Property="Margin" Value="0 0 0 8" />
182-
</DataTrigger>
183-
</Style.Triggers>
184-
</Style>
176+
185177

186178
<!-- Edited Base.xaml -->
187179
<!-- Theme Custom -->
@@ -191,7 +183,7 @@
191183
<Setter Property="Foreground" Value="#000000" />
192184
<Setter Property="CaretBrush" Value="#000000" />
193185
<Setter Property="FontSize" Value="26" />
194-
<Setter Property="Padding" Value="0 4 0 0" />
186+
<Setter Property="Padding" Value="0 4 0 0" />
195187
</Style>
196188

197189
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
@@ -249,7 +241,7 @@
249241
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
250242
<Setter Property="Fill" Value="#c6c6c6"/>
251243
<Setter Property="Height" Value="1"/>
252-
<Setter Property="Margin" Value="12 0 12 0"/>
244+
<Setter Property="Margin" Value="12 0 12 8"/>
253245
</Style>
254246
<Style x:Key="HighlightStyle">
255247
<Setter Property="Inline.Foreground" Value="#0078d7" />

Flow.Launcher/Themes/Win11Dark.xaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- Further font customisations are dynamically loaded in Theme.cs -->
66
<Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}">
77
<Setter Property="BorderThickness" Value="0" />
8-
<Setter Property="FontSize" Value="28" />
8+
<Setter Property="FontSize" Value="22" />
99
<Setter Property="FontWeight" Value="Normal" />
1010
<Setter Property="Height" Value="54" />
1111
<Setter Property="Background" Value="#2F2F2F" />
@@ -129,7 +129,8 @@
129129
<ScrollBar x:Name="PART_VerticalScrollBar"
130130
AutomationProperties.AutomationId="VerticalScrollBar"
131131
Cursor="Arrow"
132-
Grid.Column="1"
132+
Grid.Column="0"
133+
HorizontalAlignment="Right"
133134
Margin="0 0 0 0"
134135
Maximum="{TemplateBinding ScrollableHeight}"
135136
Minimum="0"
@@ -248,14 +249,26 @@
248249
</Style.Triggers>
249250
</Style>
250251
<Style x:Key="SeparatorStyle" BasedOn="{StaticResource BaseSeparatorStyle}" TargetType="{x:Type Rectangle}">
251-
<Setter Property="Fill" Value="#9a9a9a"/>
252+
<Setter Property="Fill" Value="#4d4d4d"/>
252253
<Setter Property="Height" Value="1"/>
253254
<Setter Property="Margin" Value="12 0 12 8"/>
254255
</Style>
255256
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
256257
<Setter Property="FontSize" Value="13" />
257258
<Setter Property="Foreground" Value="#7b7b7b" />
258259
</Style>
259-
260+
<Geometry x:Key="SearchIconImg">F1 M12000,12000z M0,0z M10354,10962C10326,10951 10279,10927 10249,10907 10216,10886 9476,10153 8370,9046 7366,8042 6541,7220 6536,7220 6532,7220 6498,7242 6461,7268 6213,7447 5883,7619 5592,7721 5194,7860 4802,7919 4360,7906 3612,7886 2953,7647 2340,7174 2131,7013 1832,6699 1664,6465 1394,6088 1188,5618 1097,5170 1044,4909 1030,4764 1030,4470 1030,4130 1056,3914 1135,3609 1263,3110 1511,2633 1850,2235 1936,2134 2162,1911 2260,1829 2781,1395 3422,1120 4090,1045 4271,1025 4667,1025 4848,1045 5505,1120 6100,1368 6630,1789 6774,1903 7081,2215 7186,2355 7362,2588 7467,2759 7579,2990 7802,3455 7911,3937 7911,4460 7911,4854 7861,5165 7737,5542 7684,5702 7675,5724 7602,5885 7517,6071 7390,6292 7270,6460 7242,6499 7220,6533 7220,6538 7220,6542 8046,7371 9055,8380 10441,9766 10898,10229 10924,10274 10945,10308 10966,10364 10976,10408 10990,10472 10991,10493 10980,10554 10952,10717 10840,10865 10690,10937 10621,10971 10607,10974 10510,10977 10425,10980 10395,10977 10354,10962z M4685,7050C5214,7001 5694,6809 6100,6484 6209,6396 6396,6209 6484,6100 7151,5267 7246,4110 6721,3190 6369,2571 5798,2137 5100,1956 4706,1855 4222,1855 3830,1957 3448,2056 3140,2210 2838,2453 2337,2855 2010,3427 1908,4080 1877,4274 1877,4656 1908,4850 1948,5105 2028,5370 2133,5590 2459,6272 3077,6782 3810,6973 3967,7014 4085,7034 4290,7053 4371,7061 4583,7059 4685,7050z</Geometry>
261+
<Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
262+
<Setter Property="Width" Value="32" />
263+
<Setter Property="Height" Value="32" />
264+
<Setter Property="Margin" Value="0 2 18 0" />
265+
<Setter Property="Background" Value="Transparent" />
266+
<Setter Property="HorizontalAlignment" Value="Right" />
267+
</Style>
268+
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
269+
<Setter Property="Fill" Value="#4d4d4d" />
270+
<Setter Property="Width" Value="32" />
271+
<Setter Property="Height" Value="32" />
272+
</Style>
260273
</ResourceDictionary>
261274

0 commit comments

Comments
 (0)