mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-05 17:49:16 +03:00
Ladybird/Qt: Set find in page query to selected text on initial focus
This commit is contained in:
parent
251bb4b860
commit
8c2f1fd68f
Notes:
sideshowbarker
2024-07-17 01:46:00 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/8c2f1fd68f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/36
@ -105,6 +105,9 @@ void FindInPageWidget::focusInEvent(QFocusEvent* event)
|
|||||||
{
|
{
|
||||||
QWidget::focusInEvent(event);
|
QWidget::focusInEvent(event);
|
||||||
m_find_text->setFocus();
|
m_find_text->setFocus();
|
||||||
|
auto selected_text = m_content_view->selected_text();
|
||||||
|
if (!selected_text.is_empty())
|
||||||
|
m_find_text->setText(qstring_from_ak_string(selected_text));
|
||||||
m_find_text->selectAll();
|
m_find_text->selectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user