Improved File Rename Feature and Icon Update

- ContextMenu.cs: Updated icon paths and glyphs
- en.xaml: Improved readability by refining text and adding comments
- Constants.cs: Added image path constants for the file rename feature
- RenameFile.xaml: Adjusted window size and improved alignment of UI elements
- rename.png: Added new icon image
This commit is contained in:
DB P 2025-06-25 21:14:03 +09:00
parent 54f126ac91
commit f991d91b8f
5 changed files with 29 additions and 35 deletions

View file

@ -215,8 +215,8 @@ namespace Flow.Launcher.Plugin.Explorer
},
// placeholder until real image is found
IcoPath = Constants.ShowContextMenuImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue70f")
IcoPath = Constants.RenameImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8ac")
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

View file

@ -190,15 +190,15 @@
<system:String x:Key="OneYearAgo">1 year ago</system:String>
<system:String x:Key="YearsAgo">{0} years ago</system:String>
<!--Rename File Dialog-->
<system:String x:Key="plugin_explorer_new_file_name">New name:</system:String>
<!-- Rename File Dialog -->
<system:String x:Key="plugin_explorer_new_file_name">New name</system:String>
<system:String x:Key="plugin_explorer_rename_file_done">Rename</system:String>
<system:String x:Key="plugin_explorer_rename_a_file">Rename</system:String>
<system:String x:Key="plugin_explorer_not_a_new_name">The given name: {0} was not new.</system:String>
<system:String x:Key="plugin_explorer_field_may_not_be_empty">{0} may not be empty.</system:String>
<system:String x:Key="plugin_explorer_invalid_name">{0} is an invalid name.</system:String>
<system:String x:Key="plugin_explorer_file_not_found">The specified item: {0} was not found</system:String>
<system:String x:Key="plugin_explorer_rename_subtitle">Open a dialog to rename this.</system:String>
<system:String x:Key="plugin_explorer_rename_subtitle">Open a dialog to rename this</system:String>
<system:String x:Key="plugin_explorer_cannot_rename">This cannot be renamed.</system:String>
<system:String x:Key="plugin_explorer_successful_rename">Successfully renamed it to: {0}</system:String>
<system:String x:Key="plugin_explorer_element_already_exists">There is already a file with the name: {0} in this location</system:String>

View file

@ -17,6 +17,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
internal const string QuickAccessImagePath = "Images\\quickaccess.png";
internal const string RemoveQuickAccessImagePath = "Images\\removequickaccess.png";
internal const string ShowContextMenuImagePath = "Images\\context_menu.png";
internal const string RenameImagePath = "Images\\rename.png";
internal const string EverythingErrorImagePath = "Images\\everything_error.png";
internal const string IndexSearchWarningImagePath = "Images\\index_error.png";
internal const string WindowsIndexErrorImagePath = "Images\\index_error2.png";

View file

@ -6,8 +6,8 @@
xmlns:local="clr-namespace:Flow.Launcher.Plugin.Explorer.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{DynamicResource plugin_explorer_manageactionkeywords_header}"
Width="Auto"
Height="160"
Height="180"
MaxWidth="600"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource PopupTextColor}"
@ -16,24 +16,23 @@
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32"
ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="40"/>
<RowDefinition />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="4"
@ -48,10 +47,8 @@
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
Value="False">
<Setter Property="Opacity"
Value="0.5"/>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
@ -67,27 +64,25 @@
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource plugin_explorer_rename_a_file}"
TextAlignment="Center"/>
TextAlignment="Left" />
</StackPanel>
<StackPanel Margin="0 10 0 0"
Orientation="Horizontal">
<StackPanel Margin="0 10 0 0" Orientation="Horizontal">
<TextBlock
MinWidth="150"
Margin="0 10 5 10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource plugin_explorer_new_file_name}"/>
Text="{DynamicResource plugin_explorer_new_file_name}" />
<TextBox
Name="RenameTb"
Width="Auto"
Width="300"
HorizontalAlignment="Left"
VerticalAlignment="Center"
PreviewKeyDown="RenameTb_OnKeyDown"
Text="{Binding NewFileName}"
GotFocus="SelectAll_OnTextBoxGotFocus"
/>
PreviewKeyDown="RenameTb_OnKeyDown"
Text="{Binding NewFileName}" />
</StackPanel>
</StackPanel>
</StackPanel>
@ -96,24 +91,22 @@
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0 1 0 0">
<StackPanel HorizontalAlignment="Center"
Orientation="Horizontal">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Button
x:Name="btnCancel"
Width="145"
Height="30"
Height="34"
Margin="5 0 5 0"
Click="BtnCancel"
Content="{DynamicResource cancel}"/>
Content="{DynamicResource cancel}" />
<Button
Name="btnDone"
Width="145"
Height="30"
Height="34"
Margin="5 0 5 0"
Click="OnDoneButtonClick"
Style="{StaticResource AccentButtonStyle}">
<TextBlock x:Name="lblAdd"
Text="{DynamicResource plugin_explorer_rename_file_done}"/>
<TextBlock x:Name="lblAdd" Text="{DynamicResource plugin_explorer_rename_file_done}" />
</Button>
</StackPanel>
</Border>