mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 16:28:54 +00:00
LibGfx+LibWeb+UI: Add OpenHand cursor for CSS grab property
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
19577b966e
commit
660bcfa2cd
Notes:
github-actions[bot]
2025-09-13 12:28:12 +00:00
Author: https://github.com/make-42 🔰
Commit: 660bcfa2cd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6102
Reviewed-by: https://github.com/gmta ✅
4 changed files with 8 additions and 0 deletions
|
@ -28,6 +28,7 @@ enum class StandardCursor {
|
|||
ResizeRow,
|
||||
Hand,
|
||||
Help,
|
||||
OpenHand,
|
||||
Drag,
|
||||
DragCopy,
|
||||
Move,
|
||||
|
|
|
@ -108,6 +108,7 @@ static Gfx::Cursor resolve_cursor(Layout::NodeWithStyle const& layout_node, Vect
|
|||
case CSS::CursorPredefined::Cell:
|
||||
return Gfx::StandardCursor::Crosshair;
|
||||
case CSS::CursorPredefined::Grab:
|
||||
return Gfx::StandardCursor::OpenHand;
|
||||
case CSS::CursorPredefined::Grabbing:
|
||||
return Gfx::StandardCursor::Drag;
|
||||
case CSS::CursorPredefined::Pointer:
|
||||
|
|
|
@ -417,6 +417,9 @@ static void copy_data_to_clipboard(StringView data, NSPasteboardType pasteboard_
|
|||
// FIXME: AppKit does not have a corresponding cursor, so we should make one.
|
||||
[[NSCursor arrowCursor] set];
|
||||
break;
|
||||
case Gfx::StandardCursor::OpenHand:
|
||||
[[NSCursor openHandCursor] set];
|
||||
break;
|
||||
case Gfx::StandardCursor::Drag:
|
||||
[[NSCursor closedHandCursor] set];
|
||||
break;
|
||||
|
|
|
@ -680,6 +680,9 @@ void WebContentView::update_cursor(Gfx::Cursor cursor)
|
|||
case Gfx::StandardCursor::Help:
|
||||
setCursor(Qt::WhatsThisCursor);
|
||||
break;
|
||||
case Gfx::StandardCursor::OpenHand:
|
||||
setCursor(Qt::OpenHandCursor);
|
||||
break;
|
||||
case Gfx::StandardCursor::Drag:
|
||||
setCursor(Qt::ClosedHandCursor);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue