mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
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:
parent
b84056c05b
commit
9322f0d110
Notes:
sideshowbarker
2024-07-17 06:46:15 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/9322f0d110 Pull-request: https://github.com/SerenityOS/serenity/pull/22859
1 changed files with 1 additions and 1 deletions
|
@ -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>();
|
||||
|
|
Loading…
Reference in a new issue