Skip to content

Commit cd4ea6b

Browse files
committed
Results: Remove hotkey rectangle
1 parent beb3517 commit cd4ea6b

File tree

7 files changed

+3
-131
lines changed

7 files changed

+3
-131
lines changed

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ private void ApplyFontSettings(ResourceDictionary dict)
155155
}
156156

157157
if (dict["ItemTitleStyle"] is Style resultItemStyle &&
158-
dict["ItemTitleSelectedStyle"] is Style resultItemSelectedStyle &&
159-
dict["ItemHotkeyStyle"] is Style resultHotkeyItemStyle &&
160-
dict["ItemHotkeySelectedStyle"] is Style resultHotkeyItemSelectedStyle)
158+
dict["ItemTitleSelectedStyle"] is Style resultItemSelectedStyle)
161159
{
162160
var fontFamily = new FontFamily(_settings.ResultFont);
163161
var fontStyle = FontHelper.GetFontStyleFromInvariantStringOrNormal(_settings.ResultFontStyle);
@@ -166,8 +164,6 @@ private void ApplyFontSettings(ResourceDictionary dict)
166164

167165
SetFontProperties(resultItemStyle, fontFamily, fontStyle, fontWeight, fontStretch, false);
168166
SetFontProperties(resultItemSelectedStyle, fontFamily, fontStyle, fontWeight, fontStretch, false);
169-
SetFontProperties(resultHotkeyItemStyle, fontFamily, fontStyle, fontWeight, fontStretch, false);
170-
SetFontProperties(resultHotkeyItemSelectedStyle, fontFamily, fontStyle, fontWeight, fontStretch, false);
171167
}
172168

173169
if (dict["ItemSubTitleStyle"] is Style resultSubItemStyle &&
@@ -285,9 +281,7 @@ private ResourceDictionary GetResourceDictionary(string theme)
285281
}
286282

287283
if (dict["ItemTitleStyle"] is Style resultItemStyle &&
288-
dict["ItemTitleSelectedStyle"] is Style resultItemSelectedStyle &&
289-
dict["ItemHotkeyStyle"] is Style resultHotkeyItemStyle &&
290-
dict["ItemHotkeySelectedStyle"] is Style resultHotkeyItemSelectedStyle)
284+
dict["ItemTitleSelectedStyle"] is Style resultItemSelectedStyle)
291285
{
292286
Setter fontFamily = new Setter(TextBlock.FontFamilyProperty, new FontFamily(_settings.ResultFont));
293287
Setter fontStyle = new Setter(TextBlock.FontStyleProperty, FontHelper.GetFontStyleFromInvariantStringOrNormal(_settings.ResultFontStyle));
@@ -296,7 +290,7 @@ private ResourceDictionary GetResourceDictionary(string theme)
296290

297291
Setter[] setters = { fontFamily, fontStyle, fontWeight, fontStretch };
298292
Array.ForEach(
299-
new[] { resultItemStyle, resultItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o
293+
new[] { resultItemStyle, resultItemSelectedStyle }, o
300294
=> Array.ForEach(setters, p => o.Setters.Add(p)));
301295
}
302296

Flow.Launcher/Resources/Dark.xaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<SolidColorBrush x:Key="ThumbColor" Color="#28F7F3FF" />
1616
<SolidColorBrush x:Key="InlineHighlight" Color="#0078d7" />
1717
<SolidColorBrush x:Key="HotkeyForeground" Color="#33FFFFFF" />
18-
<SolidColorBrush x:Key="HotkeySelectedForeground" Color="#33FFFFFF" />
1918
<Color x:Key="ItemSelectedBackgroundColorBrush">#198F8F8F</Color>
2019

2120
<SolidColorBrush x:Key="BasicSystemAccentColor" Color="{m:DynamicColor SystemAccentColorLight1}" />
@@ -57,9 +56,6 @@
5756
<SolidColorBrush x:Key="BasicSeparatorColor" Color="#cecece" />
5857
<SolidColorBrush x:Key="BasicLineColor" Color="#cecece" />
5958

60-
<SolidColorBrush x:Key="NewHotkeyForeground" Color="#44FFFFFF" />
61-
<SolidColorBrush x:Key="BasicHotkeyBGColor" Color="#13FFFFFF" />
62-
6359
<SolidColorBrush x:Key="ThemeHoverButton" Color="#3c3c3c" />
6460
<SolidColorBrush x:Key="PopuBGColor" Color="#202020" />
6561
<SolidColorBrush x:Key="PopupBGColor" Color="#202020" />

Flow.Launcher/Resources/Light.xaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<SolidColorBrush x:Key="ThumbColor" Color="#1F000000" />
1616
<SolidColorBrush x:Key="InlineHighlight" Color="#0078d7" />
1717
<SolidColorBrush x:Key="HotkeyForeground" Color="#51000000" />
18-
<SolidColorBrush x:Key="HotkeySelectedForeground" Color="#51000000" />
1918
<Color x:Key="ItemSelectedBackgroundColorBrush">#7EFFFFFF</Color>
2019

2120
<SolidColorBrush x:Key="BasicSystemAccentColor" Color="{m:DynamicColor SystemAccentColor}" />
@@ -51,9 +50,6 @@
5150
<SolidColorBrush x:Key="PluginInfoColor" Color="#8f8f8f" />
5251
<SolidColorBrush x:Key="BasicLabelColor" Color="#1b1b1b" />
5352

54-
<SolidColorBrush x:Key="NewHotkeyForeground" Color="#5E000000" />
55-
<SolidColorBrush x:Key="BasicHotkeyBGColor" Color="#0A000000" />
56-
5753
<SolidColorBrush x:Key="ThemeHoverButton" Color="#f6f6f6" />
5854
<!-- Typo -->
5955
<SolidColorBrush x:Key="PopuBGColor" Color="#ffffff" />

Flow.Launcher/ResultListBox.xaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -47,36 +47,11 @@
4747
UseLayoutRounding="False">
4848
<Grid.Resources>
4949
<converter:HighlightTextConverter x:Key="HighlightTextConverter" />
50-
<converter:OrdinalConverter x:Key="OrdinalConverter" />
51-
<converter:OpenResultHotkeyVisibilityConverter x:Key="OpenResultHotkeyVisibilityConverter" />
5250
</Grid.Resources>
5351
<Grid.ColumnDefinitions>
5452
<ColumnDefinition Style="{DynamicResource ImageAreaWidth}" />
5553
<ColumnDefinition Width="9*" />
56-
<ColumnDefinition Width="Auto" MinWidth="8" />
5754
</Grid.ColumnDefinitions>
58-
<Border
59-
x:Name="HotkeyBG"
60-
Grid.Column="2"
61-
VerticalAlignment="Center"
62-
Style="{DynamicResource ItemHotkeyBGStyle}">
63-
<Border.Visibility>
64-
<Binding Converter="{StaticResource ResourceKey=OpenResultHotkeyVisibilityConverter}" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" />
65-
</Border.Visibility>
66-
<TextBlock
67-
x:Name="Hotkey"
68-
Padding="0 0 0 0"
69-
HorizontalAlignment="Right"
70-
VerticalAlignment="Center"
71-
Style="{DynamicResource ItemHotkeyStyle}">
72-
<TextBlock.Text>
73-
<MultiBinding StringFormat="{}{0}+{1}">
74-
<Binding Mode="OneWay" Path="Settings.OpenResultModifiers" />
75-
<Binding Converter="{StaticResource ResourceKey=OrdinalConverter}" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" />
76-
</MultiBinding>
77-
</TextBlock.Text>
78-
</TextBlock>
79-
</Border>
8055

8156
<StackPanel
8257
Grid.Column="0"
@@ -142,8 +117,6 @@
142117
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
143118
<Setter TargetName="Title" Property="Style" Value="{DynamicResource ItemTitleSelectedStyle}" />
144119
<Setter TargetName="SubTitle" Property="Style" Value="{DynamicResource ItemSubTitleSelectedStyle}" />
145-
<Setter TargetName="Hotkey" Property="Style" Value="{DynamicResource ItemHotkeySelectedStyle}" />
146-
<Setter TargetName="HotkeyBG" Property="Style" Value="{DynamicResource ItemHotkeyBGSelectedStyle}" />
147120
<Setter TargetName="GlyphIcon" Property="Style" Value="{DynamicResource ItemGlyphSelectedStyle}" />
148121
</DataTrigger>
149122
</DataTemplate.Triggers>

Flow.Launcher/Themes/Base.xaml

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -291,44 +291,6 @@
291291
<Style x:Key="HighlightStyle">
292292
<Setter Property="Inline.FontWeight" Value="Bold" />
293293
</Style>
294-
<Style x:Key="BaseItemHotkeyStyle" TargetType="{x:Type TextBlock}">
295-
<Setter Property="FontSize" Value="12" />
296-
<Setter Property="Foreground" Value="#8f8f8f" />
297-
</Style>
298-
<Style x:Key="BaseItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
299-
<Setter Property="FontSize" Value="12" />
300-
<Setter Property="Foreground" Value="#8f8f8f" />
301-
</Style>
302-
<Style x:Key="BaseItemHotkeyBGStyle" TargetType="{x:Type Border}">
303-
<Setter Property="Margin" Value="12 0 22 0" />
304-
<Setter Property="Padding" Value="6 4 6 4" />
305-
<Setter Property="Background" Value="#138A8A8A" />
306-
<Setter Property="CornerRadius" Value="4" />
307-
</Style>
308-
<Style x:Key="BaseItemHotkeyBGSelectedStyle" TargetType="{x:Type Border}">
309-
<Setter Property="Margin" Value="12 0 22 0" />
310-
<Setter Property="Padding" Value="6 4 6 4" />
311-
<Setter Property="CornerRadius" Value="4" />
312-
<Setter Property="Background" Value="#138A8A8A" />
313-
</Style>
314-
<Style
315-
x:Key="ItemHotkeyBGStyle"
316-
BasedOn="{StaticResource BaseItemHotkeyBGStyle}"
317-
TargetType="{x:Type Border}">
318-
<Setter Property="Margin" Value="12 0 22 0" />
319-
<Setter Property="Padding" Value="6 4 6 4" />
320-
<Setter Property="CornerRadius" Value="4" />
321-
</Style>
322-
<Style
323-
x:Key="ItemHotkeyBGSelectedStyle"
324-
BasedOn="{StaticResource BaseItemHotkeyBGSelectedStyle}"
325-
TargetType="{x:Type Border}" />
326-
327-
<!-- DO NOT USE THIS KEY. this key for themes with wrong typo. This key should be removed. Right key is BaseItemHotkeySelectedStyle. -->
328-
<Style x:Key="BaseItemHotkeySelecetedStyle" TargetType="{x:Type TextBlock}">
329-
<Setter Property="FontSize" Value="12" />
330-
<Setter Property="Foreground" Value="#8f8f8f" />
331-
</Style>
332294

333295
<Style x:Key="BasePreviewBorderStyle" TargetType="{x:Type Border}">
334296
<Setter Property="BorderThickness" Value="1 0 0 0" />
@@ -403,20 +365,6 @@
403365
<Setter Property="VerticalAlignment" Value="Center" />
404366
</Style>
405367

406-
<Style
407-
x:Key="ItemHotkeyStyle"
408-
BasedOn="{StaticResource BaseItemHotkeyStyle}"
409-
TargetType="{x:Type TextBlock}">
410-
<Setter Property="Foreground" Value="#8f8f8f" />
411-
<Setter Property="Opacity" Value="0.5" />
412-
</Style>
413-
<Style
414-
x:Key="ItemHotkeySelectedStyle"
415-
BasedOn="{StaticResource BaseItemHotkeySelectedStyle}"
416-
TargetType="{x:Type TextBlock}">
417-
<Setter Property="Foreground" Value="#8f8f8f" />
418-
<Setter Property="Opacity" Value="0.5" />
419-
</Style>
420368
<Style
421369
x:Key="ItemGlyphSelectedStyle"
422370
BasedOn="{StaticResource BaseGlyphSelectedStyle}"

Flow.Launcher/Themes/Win10System.xaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,6 @@
113113
<Style x:Key="HighlightStyle">
114114
<Setter Property="Inline.FontWeight" Value="SemiBold" />
115115
</Style>
116-
<Style
117-
x:Key="ItemHotkeyStyle"
118-
BasedOn="{StaticResource BaseItemHotkeyStyle}"
119-
TargetType="{x:Type TextBlock}">
120-
<Setter Property="FontSize" Value="11" />
121-
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
122-
</Style>
123-
<Style
124-
x:Key="ItemHotkeySelectedStyle"
125-
BasedOn="{StaticResource BaseItemHotkeySelectedStyle}"
126-
TargetType="{x:Type TextBlock}">
127-
<Setter Property="FontSize" Value="11" />
128-
<Setter Property="Foreground" Value="{DynamicResource HotkeySelectedForeground}" />
129-
</Style>
130116
<!-- button style in the middle of the scrollbar -->
131117
<Style
132118
x:Key="ThumbStyle"

Flow.Launcher/Themes/Win11Light.xaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -130,27 +130,6 @@
130130
BasedOn="{StaticResource BaseScrollBarStyle}"
131131
TargetType="{x:Type ScrollBar}" />
132132

133-
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
134-
<Setter Property="FontSize" Value="11" />
135-
<Setter Property="Foreground" Value="{DynamicResource NewHotkeyForeground}" />
136-
</Style>
137-
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
138-
<Setter Property="FontSize" Value="11" />
139-
<Setter Property="Foreground" Value="{DynamicResource NewHotkeyForeground}" />
140-
</Style>
141-
<Style
142-
x:Key="ItemHotkeyBGStyle"
143-
BasedOn="{StaticResource BaseItemHotkeyBGStyle}"
144-
TargetType="{x:Type Border}">
145-
<Setter Property="Background" Value="{DynamicResource BasicHotkeyBGColor}" />
146-
</Style>
147-
<Style
148-
x:Key="ItemHotkeyBGSelectedStyle"
149-
BasedOn="{StaticResource BaseItemHotkeyBGSelectedStyle}"
150-
TargetType="{x:Type Border}">
151-
<Setter Property="Background" Value="{DynamicResource BasicHotkeyBGColor}" />
152-
</Style>
153-
154133
<Style x:Key="ItemGlyphSelectedStyle" TargetType="{x:Type TextBlock}">
155134
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
156135
<Setter Property="VerticalAlignment" Value="Center" />

0 commit comments

Comments
 (0)