UI/Qt: Display query results on find in page panel

The number of matches and current match index are now displayed to the
user when a find in page query is performed.
This commit is contained in:
Tim Ledbetter
2024-06-09 19:25:17 +01:00
committed by Tim Flynn
parent 0a3203fa25
commit 2ea680b5b3
3 changed files with 27 additions and 0 deletions

View File

@@ -315,6 +315,10 @@ Tab::Tab(BrowserWindow* window, WebContentOptions const& web_content_options, St
view().file_picker_closed(std::move(selected_files));
};
view().on_find_in_page = [this](auto current_match_index, auto const& total_match_count) {
m_find_in_page->update_result_label(current_match_index, total_match_count);
};
m_select_dropdown = new QMenu("Select Dropdown", this);
QObject::connect(m_select_dropdown, &QMenu::aboutToHide, this, [this]() {
if (!m_select_dropdown->activeAction())