Skip to content

Commit 00c2119

Browse files
committed
Add Hotkey border style
1 parent fe62a03 commit 00c2119

File tree

3 files changed

+27
-20
lines changed

3 files changed

+27
-20
lines changed

Flow.Launcher/ResultListBox.xaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,24 @@
6565
Margin="0 0 10 0"
6666
VerticalAlignment="Center"
6767
Visibility="{Binding ShowOpenResultHotkey}">
68-
<TextBlock
69-
x:Name="Hotkey"
70-
Margin="12 0 12 0"
71-
Padding="0 0 0 0"
72-
HorizontalAlignment="Right"
73-
VerticalAlignment="Center"
74-
Style="{DynamicResource ItemHotkeyStyle}">
75-
<TextBlock.Visibility>
68+
<Border x:Name="HotkeyBG" Style="{DynamicResource ItemHotkeyBGStyle}">
69+
<Border.Visibility>
7670
<Binding Converter="{StaticResource ResourceKey=OpenResultHotkeyVisibilityConverter}" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" />
77-
</TextBlock.Visibility>
78-
<TextBlock.Text>
79-
<MultiBinding StringFormat="{}{0}+{1}">
80-
<Binding Path="OpenResultModifiers" />
81-
<Binding Converter="{StaticResource ResourceKey=OrdinalConverter}" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" />
82-
</MultiBinding>
83-
</TextBlock.Text>
84-
</TextBlock>
71+
</Border.Visibility>
72+
<TextBlock
73+
x:Name="Hotkey"
74+
Padding="0 0 0 0"
75+
HorizontalAlignment="Right"
76+
VerticalAlignment="Center"
77+
Style="{DynamicResource ItemHotkeyStyle}">
78+
<TextBlock.Text>
79+
<MultiBinding StringFormat="{}{0}+{1}">
80+
<Binding Path="OpenResultModifiers" />
81+
<Binding Converter="{StaticResource ResourceKey=OrdinalConverter}" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}" />
82+
</MultiBinding>
83+
</TextBlock.Text>
84+
</TextBlock>
85+
</Border>
8586
</StackPanel>
8687

8788
<Grid Grid.Column="0">

Flow.Launcher/Themes/Base.xaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,19 @@
351351
<Setter Property="Inline.FontWeight" Value="Bold" />
352352
</Style>
353353
<Style x:Key="BaseItemHotkeyStyle" TargetType="{x:Type TextBlock}">
354-
<Setter Property="FontSize" Value="15" />
354+
<Setter Property="FontSize" Value="10" />
355355
<Setter Property="Foreground" Value="#8f8f8f" />
356356
</Style>
357357
<Style x:Key="BaseItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
358-
<Setter Property="FontSize" Value="15" />
358+
<Setter Property="FontSize" Value="10" />
359359
<Setter Property="Foreground" Value="#8f8f8f" />
360360
</Style>
361+
<Style x:Key="ItemHotkeyBGStyle" TargetType="{x:Type Border}">
362+
<Setter Property="Margin" Value="12 0 12 0" />
363+
<Setter Property="Padding" Value="6 4 6 4" />
364+
<Setter Property="Background" Value="#138A8A8A" />
365+
<Setter Property="CornerRadius" Value="4" />
366+
</Style>
361367

362368
<!-- DO NOT USE THIS KEY. this key for themes with wrong typo. This key should be removed. Right key is BaseItemHotkeySelectedStyle. -->
363369
<Style x:Key="BaseItemHotkeySelecetedStyle" TargetType="{x:Type TextBlock}">

Flow.Launcher/Themes/Win11Light.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@
156156
</Style>
157157

158158
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
159-
<Setter Property="FontSize" Value="12" />
159+
<Setter Property="FontSize" Value="10" />
160160
<Setter Property="Foreground" Value="{DynamicResource HotkeyForeground}" />
161161
</Style>
162162
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
163-
<Setter Property="FontSize" Value="12" />
163+
<Setter Property="FontSize" Value="10" />
164164
<Setter Property="Foreground" Value="{DynamicResource HotkeySelectedForeground}" />
165165
</Style>
166166
<Style x:Key="ItemGlyphSelectedStyle" TargetType="{x:Type TextBlock}">

0 commit comments

Comments
 (0)