Skip to content

Commit 2dabc38

Browse files
committed
- Change Default Context menu header to translatable
- Add Undo Command and icons in context menu items - Applied Contextmenu to textboxes
1 parent 137cda4 commit 2dabc38

File tree

4 files changed

+43
-5
lines changed

4 files changed

+43
-5
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
<system:String x:Key="copy">Copy</system:String>
1919
<system:String x:Key="cut">Cut</system:String>
2020
<system:String x:Key="paste">Paste</system:String>
21+
<system:String x:Key="undo">Undo</system:String>
22+
<system:String x:Key="selectAll">Select All</system:String>
2123
<system:String x:Key="fileTitle">File</system:String>
2224
<system:String x:Key="folderTitle">Folder</system:String>
2325
<system:String x:Key="textTitle">Text</system:String>
@@ -68,7 +70,7 @@
6870
<system:String x:Key="ShouldUsePinyin">Search with Pinyin</system:String>
6971
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.</system:String>
7072
<system:String x:Key="AlwaysPreview">Always Preview</system:String>
71-
<system:String x:Key="AlwaysPreviewToolTip">Always open preview panel when Flow starts. Press F1 to toggle preview. </system:String>
73+
<system:String x:Key="AlwaysPreviewToolTip">Always open preview panel when Flow starts. Press F1 to toggle preview.</system:String>
7274
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
7375

7476
<!-- Setting Plugin -->

Flow.Launcher/Resources/CustomControlTemplate.xaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@
44
xmlns:system="clr-namespace:System;assembly=mscorlib"
55
xmlns:ui="http://schemas.modernwpf.com/2019">
66

7+
<ContextMenu x:Key="TextBoxContextMenu">
8+
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}">
9+
<MenuItem.Icon>
10+
<ui:FontIcon Glyph="&#xe8c6;" />
11+
</MenuItem.Icon>
12+
</MenuItem>
13+
<MenuItem Command="ApplicationCommands.Copy" Header="{DynamicResource copy}">
14+
<MenuItem.Icon>
15+
<ui:FontIcon Glyph="&#xe8c8;" />
16+
</MenuItem.Icon>
17+
</MenuItem>
18+
<MenuItem Command="ApplicationCommands.Paste" Header="{DynamicResource paste}">
19+
<MenuItem.Icon>
20+
<ui:FontIcon Glyph="&#xe77f;" />
21+
</MenuItem.Icon>
22+
</MenuItem>
23+
<MenuItem Command="ApplicationCommands.Undo" Header="{DynamicResource undo}">
24+
<MenuItem.Icon>
25+
<ui:FontIcon Glyph="&#xe10e;" />
26+
</MenuItem.Icon>
27+
</MenuItem>
28+
<MenuItem Command="ApplicationCommands.SelectAll" Header="{DynamicResource selectAll}" />
29+
</ContextMenu>
30+
731

832
<Style TargetType="{x:Type ContentControl}">
933
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
@@ -1357,7 +1381,13 @@
13571381
</Setter>
13581382
</Style>
13591383

1360-
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox" />
1384+
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
1385+
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
1386+
</Style>
1387+
1388+
<Style BasedOn="{StaticResource DefaultPasswordBoxStyle}" TargetType="PasswordBox">
1389+
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
1390+
</Style>
13611391

13621392
<Style
13631393
x:Key="DataGridTextBoxStyle"
@@ -2969,6 +2999,8 @@
29692999
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed}" />
29703000
</Trigger>
29713001
<Trigger Property="IsEnabled" Value="False">
3002+
<!-- Hide Disabled Item -->
3003+
<Setter TargetName="LayoutRoot" Property="Visibility" Value="Collapsed" />
29723004
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutItemBackgroundDisabled}" />
29733005
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
29743006
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
@@ -3252,4 +3284,6 @@
32523284
</Trigger>
32533285
</Style.Triggers>
32543286
</Style>
3287+
3288+
32553289
</ResourceDictionary>

Flow.Launcher/SettingWindow.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
6+
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
67
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
78
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
8-
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
99
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
1010
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
1111
xmlns:sys="clr-namespace:System;assembly=mscorlib"
@@ -1039,6 +1039,7 @@
10391039
Height="34"
10401040
Margin="0,5,26,0"
10411041
HorizontalAlignment="Right"
1042+
ContextMenu="{StaticResource TextBoxContextMenu}"
10421043
DockPanel.Dock="Right"
10431044
FontSize="14"
10441045
KeyDown="PluginFilterTxb_OnKeyDown"
@@ -1430,6 +1431,7 @@
14301431
Height="34"
14311432
Margin="0,0,26,0"
14321433
HorizontalAlignment="Right"
1434+
ContextMenu="{StaticResource TextBoxContextMenu}"
14331435
DockPanel.Dock="Right"
14341436
FontSize="14"
14351437
KeyDown="PluginStoreFilterTxb_OnKeyDown"

Plugins/Flow.Launcher.Plugin.Explorer/Languages/ko.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
<system:String x:Key="plugin_explorer_actionkeywordview_search">검색:</system:String>
4040
<system:String x:Key="plugin_explorer_actionkeywordview_pathsearch">경로 검색:</system:String>
4141
<system:String x:Key="plugin_explorer_actionkeywordview_filecontentsearch">파일 내용 검색:</system:String>
42-
<system:String x:Key="plugin_explorer_actionkeywordview_indexsearch">Index Search:</system:String>
42+
<system:String x:Key="plugin_explorer_actionkeywordview_indexsearch">색인 검색:</system:String>
4343
<system:String x:Key="plugin_explorer_actionkeywordview_quickaccess">빠른 접근:</system:String>
4444
<system:String x:Key="plugin_explorer_actionkeyword_current">현재 액션 키워드</system:String>
4545
<system:String x:Key="plugin_explorer_actionkeyword_done">완료</system:String>
46-
<system:String x:Key="plugin_explorer_actionkeyword_enabled">활성</system:String>
46+
<system:String x:Key="plugin_explorer_actionkeyword_enabled">사용</system:String>
4747
<system:String x:Key="plugin_explorer_actionkeyword_enabled_tooltip">When disabled Flow will not execute this search option, and will additionally revert back to '*' to free up the action keyword</system:String>
4848
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
4949
<system:String x:Key="plugin_explorer_engine_windows_index">윈도우 색인</system:String>

0 commit comments

Comments
 (0)