mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
LibWeb: Tweak PageView::on_link_hover hook
Change: on_link_hover(String) -> on_link_hover(URL) Also, we now fire the hook when a link is unhovered as well, allowing the embedder to react to nothing being hovered anymore.
This commit is contained in:
parent
58b1ba2545
commit
63d796312d
3 changed files with 9 additions and 4 deletions
|
@ -228,8 +228,11 @@ Tab::Tab()
|
|||
|
||||
m_statusbar = widget.add<GUI::StatusBar>();
|
||||
|
||||
m_page_view->on_link_hover = [this](auto& href) {
|
||||
m_statusbar->set_text(href);
|
||||
m_page_view->on_link_hover = [this](auto& url) {
|
||||
if (url.is_valid())
|
||||
m_statusbar->set_text(url.to_string());
|
||||
else
|
||||
m_statusbar->set_text("");
|
||||
};
|
||||
|
||||
m_page_view->on_url_drop = [this](auto& url) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue