mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-12 09:20:36 +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:
parent
c1339baba8
commit
f5384d7c70
Notes:
sideshowbarker
2024-07-19 00:13:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f5384d7c700
1 changed files with 1 additions and 1 deletions
|
@ -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()))
|
||||
|
|
Loading…
Reference in a new issue