From a02de2c41015c805d7fb49bc8109f7b6b1e9fb7f Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 5 Jan 2017 22:56:32 +0100 Subject: [PATCH] Textbox take height set, when bigger then desired in autowidth mode --- source/widgets/textbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index a224e297..877266b5 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -264,7 +264,8 @@ void textbox_moveresize ( textbox *tb, int x, int y, int w, int h ) // Width determines height! int tw = MAX ( 1, w ); pango_layout_set_width ( tb->layout, PANGO_SCALE * ( tw - widget_padding_get_padding_width ( WIDGET (tb) ) - offset ) ); - h = textbox_get_height ( tb ); + int hd = textbox_get_height ( tb ); + h = MAX (hd, h); } if ( x != tb->widget.x || y != tb->widget.y || w != tb->widget.w || h != tb->widget.h ) {