mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Ladybird: Add basic cursor shape support in WebView
This commit is contained in:
parent
a7cb558783
commit
ec44691b56
Notes:
sideshowbarker
2024-07-18 00:34:07 +09:00
Author: https://github.com/fluxth Commit: https://github.com/SerenityOS/serenity/commit/ec44691b56 Pull-request: https://github.com/SerenityOS/serenity/pull/16583 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/awesomekling ✅ Reviewed-by: https://github.com/linusg
1 changed files with 14 additions and 1 deletions
|
@ -42,6 +42,7 @@
|
|||
#include <LibWebSocket/ConnectionInfo.h>
|
||||
#include <LibWebSocket/Message.h>
|
||||
#include <LibWebSocket/WebSocket.h>
|
||||
#include <QCursor>
|
||||
#include <QIcon>
|
||||
#include <QMouseEvent>
|
||||
#include <QPaintEvent>
|
||||
|
@ -158,8 +159,20 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override
|
||||
virtual void page_did_request_cursor_change(Gfx::StandardCursor cursor) override
|
||||
{
|
||||
switch (cursor) {
|
||||
case Gfx::StandardCursor::Hand:
|
||||
m_view.setCursor(Qt::PointingHandCursor);
|
||||
break;
|
||||
case Gfx::StandardCursor::IBeam:
|
||||
m_view.setCursor(Qt::IBeamCursor);
|
||||
break;
|
||||
case Gfx::StandardCursor::Arrow:
|
||||
default:
|
||||
m_view.setCursor(Qt::ArrowCursor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void page_did_request_context_menu(Gfx::IntPoint const&) override
|
||||
|
|
Loading…
Reference in a new issue