summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/render/layout.c b/render/layout.c
index 331e1efdb..95903a2bb 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -46,6 +46,7 @@
#include "content/content_protected.h"
#include "desktop/options.h"
#include "desktop/scrollbar.h"
+#include "desktop/textarea.h"
#include "render/box.h"
#include "render/font.h"
#include "render/form.h"
@@ -650,6 +651,20 @@ bool layout_block_context(struct box *block, int viewport_height,
layout_apply_minmax_height(block, NULL);
}
+ if (block->gadget &&
+ (block->gadget->type == GADGET_TEXTAREA ||
+ block->gadget->type == GADGET_PASSWORD ||
+ block->gadget->type == GADGET_TEXTBOX)) {
+ int ta_width = block->padding[LEFT] + block->width +
+ block->padding[RIGHT];
+ int ta_height = block->padding[TOP] + block->height +
+ block->padding[BOTTOM];
+ textarea_set_layout(block->gadget->data.text.ta,
+ ta_width, ta_height,
+ block->padding[TOP], block->padding[RIGHT],
+ block->padding[BOTTOM], block->padding[LEFT]);
+ }
+
return true;
}