From 068974732f2d28f09f3574f40924515548ae907a Mon Sep 17 00:00:00 2001 From: zac Date: Wed, 16 Jul 2025 22:08:09 +1000 Subject: [PATCH] LibWeb: Improve cursor appearance `draw_rect` renders the outline of a rectangle. `fill_rect` seems like a better option for rendering the cursor. --- Libraries/LibWeb/Painting/PaintableBox.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/LibWeb/Painting/PaintableBox.cpp b/Libraries/LibWeb/Painting/PaintableBox.cpp index 42e76bc19e1..42e7e25c8c1 100644 --- a/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -729,10 +729,9 @@ void paint_cursor_if_needed(PaintContext& context, TextPaintable const& paintabl 1, fragment_rect.height() }; - auto cursor_device_rect = context.rounded_device_rect(cursor_rect).to_type(); - 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)