Skip to content

Commit 39b6267

Browse files
committed
Add Hotkey Data & List Style
1 parent 16dc996 commit 39b6267

File tree

3 files changed

+109
-9
lines changed

3 files changed

+109
-9
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,22 @@
244244
<system:String x:Key="Welcome_Page5_Title">Let's Start Flow Launcher</system:String>
245245
<system:String x:Key="Welcome_Page5_Text01">Finished. Enjoy Flow Launcher. Don't forget the hotkey to start :)</system:String>
246246

247+
<!-- General Guide & Hotkey -->
248+
<system:String x:Key="Hotkey01">U+2B60, U+2B62</system:String>
249+
<system:String x:Key="Hotkey01Action">Back / Context Menu</system:String>
250+
<system:String x:Key="Hotkey02">U+2B61, U+2B63</system:String>
251+
<system:String x:Key="Hotkey02Action">Item Navigation</system:String>
252+
<system:String x:Key="Hotkey03">Shift+Enter</system:String>
253+
<system:String x:Key="Hotkey03Action">Open Context Menu</system:String>
254+
<system:String x:Key="Hotkey04">Ctrl+Enter</system:String>
255+
<system:String x:Key="Hotkey04Action">Open Contaning Folder</system:String>
256+
<system:String x:Key="Hotkey05">Ctrl+Shift+Enter</system:String>
257+
<system:String x:Key="Hotkey05Action">Run as Admin</system:String>
258+
<system:String x:Key="Hotkey06">Ctrl+C</system:String>
259+
<system:String x:Key="Hotkey06Action">Copy File Path</system:String>
260+
<system:String x:Key="Hotkey07">Ctrl+H</system:String>
261+
<system:String x:Key="Hotkey07Action">Query History</system:String>
262+
<system:String x:Key="Hotkey08">ESC</system:String>
263+
<system:String x:Key="Hotkey08Action">Back to Result in Context Menu</system:String>
264+
247265
</ResourceDictionary>

Flow.Launcher/Resources/Pages/WelcomePage3.xaml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,43 @@
1010
d:DesignWidth="800"
1111
mc:Ignorable="d">
1212
<Page.Resources>
13+
14+
<Style x:Key="HotKeyPopupListStyle" TargetType="{x:Type ListBoxItem}">
15+
<Setter Property="Focusable" Value="False" />
16+
<Setter Property="IsHitTestVisible" Value="False" />
17+
<Setter Property="Template">
18+
<Setter.Value>
19+
<ControlTemplate>
20+
<Border Padding="14,8,4,8">
21+
<DockPanel LastChildFill="True">
22+
<TextBlock
23+
Margin="0,0,12,0"
24+
DockPanel.Dock="Left"
25+
FontSize="13"
26+
FontWeight="SemiBold"
27+
Style="{DynamicResource ItemTitleStyle}"
28+
Text="{Binding Path=strHotkey}"
29+
TextAlignment="Left" />
30+
<TextBlock
31+
Margin="0,0,12,0"
32+
FontSize="13"
33+
Style="{DynamicResource ItemSubTitleStyle}"
34+
Text="{Binding Path=strHotkeyAction}" />
35+
</DockPanel>
36+
</Border>
37+
</ControlTemplate>
38+
</Setter.Value>
39+
</Setter>
40+
<Style.Triggers>
41+
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
42+
<Setter Property="Background" Value="Transparent" />
43+
</Trigger>
44+
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
45+
<Setter Property="Background" Value="#10828282" />
46+
</Trigger>
47+
</Style.Triggers>
48+
</Style>
49+
1350
<Style x:Key="StyleImageFadeIn" TargetType="{x:Type Image}">
1451
<Setter Property="Opacity" Value="0" />
1552
<Style.Triggers>
@@ -63,12 +100,13 @@
63100
FontSize="20"
64101
FontWeight="SemiBold"
65102
Text="{DynamicResource Welcome_Page3_Title}" />
66-
<TextBlock
67-
Margin="0,10,0,0"
68-
FontSize="14"
69-
TextWrapping="WrapWithOverflow">
70-
You can search the web or run various functions. Certain functions start with the expression action keyword, and if necessary, they can be used without action keywords. Type &quot;youtube bts&quot; in querybox.
71-
</TextBlock>
103+
<ListBox
104+
x:Name="HotkeyList"
105+
Padding="0,0,0,0"
106+
AlternationCount="2"
107+
Background="Transparent"
108+
DockPanel.Dock="Right"
109+
ItemContainerStyle="{DynamicResource HotKeyPopupListStyle}" />
72110
<TextBlock
73111
Margin="0,10,0,0"
74112
FontSize="14"

Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Windows;
77
using System.Windows.Controls;
88
using System.Windows.Data;
9+
using Flow.Launcher.Core.Resource;
910
using System.Windows.Documents;
1011
using System.Windows.Input;
1112
using System.Windows.Media;
@@ -15,14 +16,57 @@
1516

1617
namespace Flow.Launcher.Resources.Pages
1718
{
18-
/// <summary>
19-
/// WelcomePage3.xaml에 대한 상호 작용 논리
20-
/// </summary>
2119
public partial class WelcomePage3 : Page
2220
{
2321
public WelcomePage3()
2422
{
2523
InitializeComponent();
2624
}
25+
26+
public string strHotkey { get; set; }
27+
public string strHotkeyAction { get; set; }
28+
private List<WelcomePage3> HotkeyListData()
29+
{
30+
List<WelcomePage3> list = new List<WelcomePage3>();
31+
32+
list.Add(new WelcomePage3()
33+
{
34+
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey01")),
35+
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey01Action"))
36+
});
37+
list.Add(new WelcomePage3()
38+
{
39+
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey02")),
40+
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey02Action"))
41+
});
42+
list.Add(new WelcomePage3()
43+
{
44+
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey03")),
45+
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey03Action"))
46+
});
47+
list.Add(new WelcomePage3()
48+
{
49+
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey04")),
50+
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey04Action"))
51+
});
52+
list.Add(new WelcomePage3()
53+
{
54+
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey05")),
55+
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey05Action"))
56+
});
57+
list.Add(new WelcomePage3()
58+
{
59+
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey07")),
60+
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey07Action"))
61+
});
62+
list.Add(new WelcomePage3()
63+
{
64+
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey08")),
65+
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey08Action"))
66+
});
67+
68+
return list;
69+
}
70+
2771
}
2872
}

0 commit comments

Comments
 (0)