diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-05 22:56:32 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-05 22:56:32 +0100 |
commit | a02de2c41015c805d7fb49bc8109f7b6b1e9fb7f (patch) | |
tree | 2765cec0a39b3d18b06b208eb6b9a132e0d3305a /source | |
parent | f2a40499914469e87713642a315267954f5cc547 (diff) |
Textbox take height set, when bigger then desired in autowidth mode
Diffstat (limited to 'source')
-rw-r--r-- | source/widgets/textbox.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 ) { |