mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
LibWeb: Use the surrounding text color as the caret color
This way you can always see the cursor as long (as you can see the text you are editing.)
This commit is contained in:
parent
5d77a19af5
commit
350b2c6d9e
1 changed files with 3 additions and 1 deletions
|
@ -134,7 +134,9 @@ void TextNode::paint_cursor_if_needed(PaintContext& context, const LineBoxFragme
|
|||
float cursor_top = fragment_rect.top();
|
||||
float cursor_height = fragment_rect.height();
|
||||
Gfx::IntRect cursor_rect(cursor_x, cursor_top, 1, cursor_height);
|
||||
context.painter().draw_rect(cursor_rect, context.palette().text_cursor());
|
||||
|
||||
auto color = specified_style().color_or_fallback(CSS::PropertyID::Color, document(), context.palette().base_text());
|
||||
context.painter().draw_rect(cursor_rect, color);
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue