mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 07:52:50 +00:00
LibWeb+UI/Qt: Display 'title' tooltips only when the mouse stops moving
Now instead of sending the position in which the user entered the tooltip area, send just the text, and let the chrome figure out how to display it. In the case of Qt, wait for 600 milliseconds of no mouse movement, then display it under the mouse cursor.
This commit is contained in:
parent
6623177265
commit
0f7623dd83
Notes:
sideshowbarker
2024-07-17 08:43:11 +09:00
Author: https://github.com/circl-lastname
Commit: 0f7623dd83
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/368
12 changed files with 34 additions and 21 deletions
|
@ -170,11 +170,11 @@ void WebContentClient::did_change_url(u64 page_id, URL::URL const& url)
|
|||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_enter_tooltip_area(u64 page_id, Gfx::IntPoint content_position, ByteString const& title)
|
||||
void WebContentClient::did_enter_tooltip_area(u64 page_id, ByteString const& title)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_enter_tooltip_area)
|
||||
view->on_enter_tooltip_area(view->to_widget_position(content_position), title);
|
||||
view->on_enter_tooltip_area(title);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue