From 6cf9f509c5ce4eb7a56c03c018ef5045e8f91948 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 27 Aug 2009 15:39:34 +0200 Subject: [PATCH] textbox: extents() honors user-set width Signed-off-by: Julien Danjou --- widgets/textbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/widgets/textbox.c b/widgets/textbox.c index f2b5a17c..c4032422 100644 --- a/widgets/textbox.c +++ b/widgets/textbox.c @@ -116,6 +116,9 @@ textbox_extents(lua_State *L, widget_t *widget) geometry.width += d->margin.left + d->margin.left; geometry.height += d->margin.bottom + d->margin.top; + if(d->width) + geometry.width = d->width; + if(d->bg_image) { int bgi_height = image_getheight(d->bg_image);