mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:07:44 +00:00
Ladybird: Add basic cursor shape support in WebView
This commit is contained in:
parent
a7cb558783
commit
ec44691b56
1 changed files with 14 additions and 1 deletions
|
@ -42,6 +42,7 @@
|
||||||
#include <LibWebSocket/ConnectionInfo.h>
|
#include <LibWebSocket/ConnectionInfo.h>
|
||||||
#include <LibWebSocket/Message.h>
|
#include <LibWebSocket/Message.h>
|
||||||
#include <LibWebSocket/WebSocket.h>
|
#include <LibWebSocket/WebSocket.h>
|
||||||
|
#include <QCursor>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPaintEvent>
|
#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
|
virtual void page_did_request_context_menu(Gfx::IntPoint const&) override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue