LibWeb: Make WebContentView show the hover hand over links :^)
This commit is contained in:
parent
41066b009f
commit
c43afe71b7
Notes:
sideshowbarker
2024-07-19 05:05:19 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c43afe71b7d
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include <AK/SharedBuffer.h>
|
#include <AK/SharedBuffer.h>
|
||||||
#include <LibGUI/Painter.h>
|
#include <LibGUI/Painter.h>
|
||||||
#include <LibGUI/ScrollBar.h>
|
#include <LibGUI/ScrollBar.h>
|
||||||
|
#include <LibGUI/Window.h>
|
||||||
#include <LibGfx/SystemTheme.h>
|
#include <LibGfx/SystemTheme.h>
|
||||||
|
|
||||||
WebContentView::WebContentView()
|
WebContentView::WebContentView()
|
||||||
|
@ -129,12 +130,16 @@ void WebContentView::notify_server_did_request_scroll_into_view(Badge<WebContent
|
||||||
|
|
||||||
void WebContentView::notify_server_did_hover_link(Badge<WebContentClient>, const URL& url)
|
void WebContentView::notify_server_did_hover_link(Badge<WebContentClient>, const URL& url)
|
||||||
{
|
{
|
||||||
|
if (window())
|
||||||
|
window()->set_override_cursor(GUI::StandardCursor::Hand);
|
||||||
if (on_link_hover)
|
if (on_link_hover)
|
||||||
on_link_hover(url);
|
on_link_hover(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContentView::notify_server_did_unhover_link(Badge<WebContentClient>)
|
void WebContentView::notify_server_did_unhover_link(Badge<WebContentClient>)
|
||||||
{
|
{
|
||||||
|
if (window())
|
||||||
|
window()->set_override_cursor(GUI::StandardCursor::None);
|
||||||
if (on_link_hover)
|
if (on_link_hover)
|
||||||
on_link_hover({});
|
on_link_hover({});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue