border shouldn't affect edit's area
This commit is contained in:
parent
ca8aaf3f65
commit
d557503366
@ -174,10 +174,10 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
|
||||
return ret;
|
||||
|
||||
/* visible text area calculation */
|
||||
area.x = bounds.x + style->padding.x + style->border;
|
||||
area.y = bounds.y + style->padding.y + style->border;
|
||||
area.w = bounds.w - (2.0f * style->padding.x + 2 * style->border);
|
||||
area.h = bounds.h - (2.0f * style->padding.y + 2 * style->border);
|
||||
area.x = bounds.x + style->padding.x;
|
||||
area.y = bounds.y + style->padding.y;
|
||||
area.w = bounds.w - (2.0f * style->padding.x);
|
||||
area.h = bounds.h - (2.0f * style->padding.y);
|
||||
if (flags & NK_EDIT_MULTILINE)
|
||||
area.w = NK_MAX(0, area.w - style->scrollbar_size.x);
|
||||
row_height = (flags & NK_EDIT_MULTILINE)? font->height + style->row_padding: area.h;
|
||||
|
Loading…
Reference in New Issue
Block a user