- Change Default Context menu header to translatable

- Add Undo Command and icons in context menu items
- Applied Contextmenu to textboxes
This commit is contained in:
DB p 2022-12-21 19:06:00 +09:00
parent 137cda459e
commit 2dabc38a75
4 changed files with 43 additions and 5 deletions

View file

@ -18,6 +18,8 @@
<system:String x:Key="copy">Copy</system:String>
<system:String x:Key="cut">Cut</system:String>
<system:String x:Key="paste">Paste</system:String>
<system:String x:Key="undo">Undo</system:String>
<system:String x:Key="selectAll">Select All</system:String>
<system:String x:Key="fileTitle">File</system:String>
<system:String x:Key="folderTitle">Folder</system:String>
<system:String x:Key="textTitle">Text</system:String>
@ -68,7 +70,7 @@
<system:String x:Key="ShouldUsePinyin">Search with Pinyin</system:String>
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.</system:String>
<system:String x:Key="AlwaysPreview">Always Preview</system:String>
<system:String x:Key="AlwaysPreviewToolTip">Always open preview panel when Flow starts. Press F1 to toggle preview. </system:String>
<system:String x:Key="AlwaysPreviewToolTip">Always open preview panel when Flow starts. Press F1 to toggle preview.</system:String>
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
<!-- Setting Plugin -->

View file

@ -4,6 +4,30 @@
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019">
<ContextMenu x:Key="TextBoxContextMenu">
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe8c6;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="ApplicationCommands.Copy" Header="{DynamicResource copy}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe8c8;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="ApplicationCommands.Paste" Header="{DynamicResource paste}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe77f;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="ApplicationCommands.Undo" Header="{DynamicResource undo}">
<MenuItem.Icon>
<ui:FontIcon Glyph="&#xe10e;" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="ApplicationCommands.SelectAll" Header="{DynamicResource selectAll}" />
</ContextMenu>
<Style TargetType="{x:Type ContentControl}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
@ -1357,7 +1381,13 @@
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox" />
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
</Style>
<Style BasedOn="{StaticResource DefaultPasswordBoxStyle}" TargetType="PasswordBox">
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
</Style>
<Style
x:Key="DataGridTextBoxStyle"
@ -2969,6 +2999,8 @@
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<!-- Hide Disabled Item -->
<Setter TargetName="LayoutRoot" Property="Visibility" Value="Collapsed" />
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutItemBackgroundDisabled}" />
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
@ -3252,4 +3284,6 @@
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>

View file

@ -3,9 +3,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
@ -1039,6 +1039,7 @@
Height="34"
Margin="0,5,26,0"
HorizontalAlignment="Right"
ContextMenu="{StaticResource TextBoxContextMenu}"
DockPanel.Dock="Right"
FontSize="14"
KeyDown="PluginFilterTxb_OnKeyDown"
@ -1430,6 +1431,7 @@
Height="34"
Margin="0,0,26,0"
HorizontalAlignment="Right"
ContextMenu="{StaticResource TextBoxContextMenu}"
DockPanel.Dock="Right"
FontSize="14"
KeyDown="PluginStoreFilterTxb_OnKeyDown"

View file

@ -39,11 +39,11 @@
<system:String x:Key="plugin_explorer_actionkeywordview_search">검색:</system:String>
<system:String x:Key="plugin_explorer_actionkeywordview_pathsearch">경로 검색:</system:String>
<system:String x:Key="plugin_explorer_actionkeywordview_filecontentsearch">파일 내용 검색:</system:String>
<system:String x:Key="plugin_explorer_actionkeywordview_indexsearch">Index Search:</system:String>
<system:String x:Key="plugin_explorer_actionkeywordview_indexsearch">색인 검색:</system:String>
<system:String x:Key="plugin_explorer_actionkeywordview_quickaccess">빠른 접근:</system:String>
<system:String x:Key="plugin_explorer_actionkeyword_current">현재 액션 키워드</system:String>
<system:String x:Key="plugin_explorer_actionkeyword_done">완료</system:String>
<system:String x:Key="plugin_explorer_actionkeyword_enabled">활성</system:String>
<system:String x:Key="plugin_explorer_actionkeyword_enabled">사용</system:String>
<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>
<system:String x:Key="plugin_explorer_engine_everything">Everything</system:String>
<system:String x:Key="plugin_explorer_engine_windows_index">윈도우 색인</system:String>