mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
HackStudio: Scroll the locator suggestions when navigating with arrows
This commit is contained in:
parent
b4de5ac128
commit
29ac3e1477
Notes:
sideshowbarker
2024-07-19 11:30:44 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/29ac3e1477d
@ -89,8 +89,10 @@ Locator::Locator(GWidget* parent)
|
||||
else
|
||||
new_index = m_suggestion_view->model()->index(0);
|
||||
|
||||
if (new_index.is_valid())
|
||||
if (new_index.is_valid()) {
|
||||
m_suggestion_view->selection().set(new_index);
|
||||
m_suggestion_view->scroll_into_view(new_index, Orientation::Vertical);
|
||||
}
|
||||
};
|
||||
m_textbox->on_down = [this] {
|
||||
GModelIndex new_index = m_suggestion_view->selection().first();
|
||||
@ -99,8 +101,10 @@ Locator::Locator(GWidget* parent)
|
||||
else
|
||||
new_index = m_suggestion_view->model()->index(0);
|
||||
|
||||
if (new_index.is_valid())
|
||||
if (new_index.is_valid()) {
|
||||
m_suggestion_view->selection().set(new_index);
|
||||
m_suggestion_view->scroll_into_view(new_index, Orientation::Vertical);
|
||||
}
|
||||
};
|
||||
m_textbox->on_return_pressed = [this] {
|
||||
auto selected_index = m_suggestion_view->selection().first();
|
||||
|
Loading…
Reference in New Issue
Block a user