Textbox take height set, when bigger then desired in autowidth mode

This commit is contained in:
Dave Davenport 2017-01-05 22:56:32 +01:00
parent f2a4049991
commit a02de2c410
1 changed files with 2 additions and 1 deletions

View File

@ -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 ) {