[PowerRename] Added KeyboardAccelerator + set default width/height (#14157)
* Added acceleratorkey (enter) and fixed width/height * Update PowerRenameUIHost.cpp * Added additional modifier Co-authored-by: Laute <Niels.Laute@philips.com>
This commit is contained in:
parent
e6a7f9193b
commit
e2c8880363
|
@ -52,7 +52,7 @@ AppWindow::AppWindow(HINSTANCE hInstance, std::vector<std::wstring> files) noexc
|
|||
CComPtr<IShellItemArray> shellItemArray;
|
||||
// To test PowerRenameUIHost uncomment this line and update the path to
|
||||
// your local (absolute or relative) path which you want to see in PowerRename
|
||||
//files.push_back(L"<path>");
|
||||
// files.push_back(L"path");
|
||||
|
||||
if (!files.empty())
|
||||
{
|
||||
|
@ -88,7 +88,8 @@ void AppWindow::CreateAndShowWindow()
|
|||
wchar_t title[64];
|
||||
LoadStringW(m_instance, IDS_APP_TITLE, title, ARRAYSIZE(title));
|
||||
|
||||
m_window = CreateWindowW(c_WindowClass, title, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, CW_USEDEFAULT, nullptr, nullptr, m_instance, this);
|
||||
// hardcoded width and height (1200 x 600) - with WinUI 3, it should auto-scale to the content
|
||||
m_window = CreateWindowW(c_WindowClass, title, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 1200, 600, nullptr, nullptr, m_instance, this);
|
||||
THROW_LAST_ERROR_IF(!m_window);
|
||||
|
||||
ShowWindow(m_window, SW_SHOWNORMAL);
|
||||
|
|
|
@ -625,6 +625,7 @@
|
|||
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="AcceptsReturn" Value="False" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
||||
|
|
|
@ -258,7 +258,6 @@
|
|||
<ToggleButton x:Name="toggleButton_enumItems" Content="" FontFamily="{ThemeResource SymbolThemeFontFamily}" MinHeight="32" x:Uid="ToggleButton_EnumItems" Style="{StaticResource CustomToggleButtonStyle}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</ScrollViewer>
|
||||
|
||||
<Rectangle Height="1" Fill="{ThemeResource CardStrokeColorDefaultBrush}" HorizontalAlignment="Stretch" Margin="0,0,20,0" VerticalAlignment="Top" Grid.Row="1" />
|
||||
|
@ -304,6 +303,10 @@
|
|||
</StackPanel>
|
||||
|
||||
<muxc:SplitButton Grid.Row="1" Style="{StaticResource SplitAccentButtonStyle}" x:Name="button_rename" Margin="0,0,20,0" x:Uid="ButtonApply" Click="button_rename_Click" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsEnabled="{x:Bind UIUpdatesItem.ButtonRenameEnabled, Mode=OneWay}">
|
||||
<muxc:SplitButton.KeyboardAccelerators>
|
||||
<KeyboardAccelerator Key="Enter" />
|
||||
<KeyboardAccelerator Key="Enter" Modifiers="Control" />
|
||||
</muxc:SplitButton.KeyboardAccelerators>
|
||||
<muxc:SplitButton.Content>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon Glyph="" FontSize="14" VerticalAlignment="Center" Margin="0,2,10,0" />
|
||||
|
|
Loading…
Reference in a new issue