HackStudio: Use Autocomplete window type for Locator pop-up

This being a Popup window meant it behaved in a couple of janky ways:
- It would steal the focus each time it was shown, so after every key
  press in the TextBox.
- It would disappear when you focused that TextBox again.

Using the Autocomplete window type fixes both of these. While the
Locator is not technically an autocomplete, it shares the general "type
and get suggestions based on the input, which you can select" behavior,
so this is close enough.
This commit is contained in:
Sam Atkins 2024-01-19 12:48:43 +00:00 committed by Sam Atkins
parent b84056c05b
commit 9322f0d110
Notes: sideshowbarker 2024-07-17 06:46:15 +09:00

View file

@ -146,7 +146,7 @@ Locator::Locator(Core::EventReceiver* parent)
};
m_popup_window = GUI::Window::construct(parent);
m_popup_window->set_window_type(GUI::WindowType::Popup);
m_popup_window->set_window_type(GUI::WindowType::Autocomplete);
m_popup_window->set_rect(0, 0, 500, 200);
m_suggestion_view = m_popup_window->set_main_widget<GUI::TableView>();