mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-02 15:46:18 +03:00
Fix #0002097, with thanks to Achal-Aggarwal for tracking this down.
This commit is contained in:
parent
7738584b34
commit
b16cfd2d6e
@ -1780,13 +1780,14 @@ static void textarea_setup_text_offsets(struct textarea *ta)
|
||||
if (ta->flags & TEXTAREA_MULTILINE) {
|
||||
/* Multiline textarea */
|
||||
text_y_offset += ta->pad_top;
|
||||
text_y_offset_baseline += (ta->line_height * 3 + 2) / 4 +
|
||||
ta->pad_top;
|
||||
text_y_offset_baseline +=
|
||||
(ta->line_height * 3 + 2) / 4 + ta->pad_top;
|
||||
} else {
|
||||
/* Single line text area; text is vertically centered */
|
||||
int vis_height = ta->vis_height - 2 * ta->border_width;
|
||||
text_y_offset += (vis_height - ta->line_height + 1) / 2;
|
||||
text_y_offset_baseline += (vis_height * 3 + 2) / 4;
|
||||
text_y_offset_baseline +=
|
||||
(2 * vis_height + ta->line_height + 2) / 4;
|
||||
}
|
||||
|
||||
ta->text_y_offset = text_y_offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user