mirror of
https://github.com/RGBCube/serenity
synced 2025-05-26 01:55:08 +00:00
LibGUI: Fix cursor height in single-line text boxes
We should use the TextEditor::line_height() for the cursor height, same as we do in multi-line mode.
This commit is contained in:
parent
7e6c27a688
commit
c1339baba8
1 changed files with 1 additions and 1 deletions
|
@ -1134,7 +1134,7 @@ Gfx::IntRect TextEditor::content_rect_for_position(const TextPosition& position)
|
|||
int x = content_x_for_position(position);
|
||||
|
||||
if (is_single_line()) {
|
||||
Gfx::IntRect rect { x, 0, 1, font().glyph_height() + 2 };
|
||||
Gfx::IntRect rect { x, 0, 1, line_height() };
|
||||
rect.center_vertically_within({ {}, frame_inner_rect().size() });
|
||||
return rect;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue