mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 13:18:19 +00:00
LibWeb: Improve cursor appearance
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
`draw_rect` renders the outline of a rectangle. `fill_rect` seems like a better option for rendering the cursor.
This commit is contained in:
parent
ca9364983c
commit
068974732f
Notes:
github-actions[bot]
2025-07-31 11:08:15 +00:00
Author: https://github.com/zacoons 🔰
Commit: 068974732f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5664
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 2 deletions
|
@ -729,10 +729,9 @@ void paint_cursor_if_needed(PaintContext& context, TextPaintable const& paintabl
|
||||||
1,
|
1,
|
||||||
fragment_rect.height()
|
fragment_rect.height()
|
||||||
};
|
};
|
||||||
|
|
||||||
auto cursor_device_rect = context.rounded_device_rect(cursor_rect).to_type<int>();
|
auto cursor_device_rect = context.rounded_device_rect(cursor_rect).to_type<int>();
|
||||||
|
|
||||||
context.display_list_recorder().draw_rect(cursor_device_rect, caret_color);
|
context.display_list_recorder().fill_rect(cursor_device_rect, caret_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void paint_text_decoration(PaintContext& context, TextPaintable const& paintable, PaintableFragment const& fragment)
|
void paint_text_decoration(PaintContext& context, TextPaintable const& paintable, PaintableFragment const& fragment)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue