Fix dropdown showing in up direction (#10009)
## Summary of the Pull Request Let the dropdown menu open downwards if there's enough space, when clicking on the down arrow. ## PR Checklist * [X] Closes #8924 * [X] CLA signed. ## Detailed Description of the Pull Request / Additional comments Set the placement of the flyout to BottomEdgeAlignedLeft, as was done when opening the menu from the key binding. ## Validation Steps Performed Manual tests
This commit is contained in:
parent
7d71b4b9ba
commit
2b4c20bd6e
|
@ -524,6 +524,8 @@ namespace winrt::TerminalApp::implementation
|
|||
void TerminalPage::_CreateNewTabFlyout()
|
||||
{
|
||||
auto newTabFlyout = WUX::Controls::MenuFlyout{};
|
||||
newTabFlyout.Placement(WUX::Controls::Primitives::FlyoutPlacementMode::BottomEdgeAlignedLeft);
|
||||
|
||||
auto keyBindings = _settings.KeyMap();
|
||||
|
||||
const auto defaultProfileGuid = _settings.GlobalSettings().DefaultProfile();
|
||||
|
@ -713,13 +715,10 @@ namespace winrt::TerminalApp::implementation
|
|||
|
||||
// Function Description:
|
||||
// Called when the openNewTabDropdown keybinding is used.
|
||||
// Adds the flyout show option to left-align the dropdown with the split button.
|
||||
// Shows the dropdown flyout.
|
||||
void TerminalPage::_OpenNewTabDropdown()
|
||||
{
|
||||
WUX::Controls::Primitives::FlyoutShowOptions options{};
|
||||
options.Placement(WUX::Controls::Primitives::FlyoutPlacementMode::BottomEdgeAlignedLeft);
|
||||
_newTabButton.Flyout().ShowAt(_newTabButton, options);
|
||||
_newTabButton.Flyout().ShowAt(_newTabButton);
|
||||
}
|
||||
|
||||
winrt::fire_and_forget TerminalPage::_RemoveOnCloseRoutine(Microsoft::UI::Xaml::Controls::TabViewItem tabViewItem, winrt::com_ptr<TerminalPage> page)
|
||||
|
|
Loading…
Reference in a new issue