mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
LibGUI: Account for glyph_spacing()
in spans
This commit is contained in:
parent
32a01a60e7
commit
dad70d8d6e
Notes:
sideshowbarker
2024-07-17 00:21:39 +09:00
Author: https://github.com/cammo1123
Commit: dad70d8d6e
Pull-request: https://github.com/SerenityOS/serenity/pull/17386
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 1 deletions
|
@ -572,7 +572,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
|||
if (length == 0)
|
||||
return;
|
||||
auto text = visual_line_text.substring_view(start, length);
|
||||
span_rect.set_width(font->width(text));
|
||||
span_rect.set_width(font->width(text) + font->glyph_spacing());
|
||||
if (text_attributes.background_color.has_value()) {
|
||||
painter.fill_rect(span_rect, text_attributes.background_color.value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue