mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibGUI: Correct selection width when using fonts with glyph spacing
We were not adding the glyph spacing after the last character in the selection, causing it to be slightly too small in some cases.
This commit is contained in:
@@ -1666,7 +1666,7 @@ void TextEditor::for_each_visual_line(size_t line_index, Callback callback) cons
|
||||
Gfx::IntRect visual_line_rect {
|
||||
visual_data.visual_rect.x(),
|
||||
visual_data.visual_rect.y() + ((int)visual_line_index * line_height()),
|
||||
font().width(visual_line_view),
|
||||
font().width(visual_line_view) + font().glyph_spacing(),
|
||||
line_height()
|
||||
};
|
||||
if (is_right_text_alignment(text_alignment()))
|
||||
|
||||
Reference in New Issue
Block a user