summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-03-31 14:05:12 +0200
committerDave Davenport <qball@gmpclient.org>2020-03-31 14:05:12 +0200
commit8be08007f8f3741714bc31c71a9c26269d93eb7d (patch)
treebd3ca04496d7c0f033eea2332dbc3071cfebf100
parentc6a405e8409caa524bb4e763f6ca696ebcc77715 (diff)
[Textbox] Round estimated size up.
-rw-r--r--source/widgets/textbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c
index bab5eb9f..482d1037 100644
--- a/source/widgets/textbox.c
+++ b/source/widgets/textbox.c
@@ -911,7 +911,7 @@ double textbox_get_estimated_ch ( void )
int textbox_get_estimated_height ( const textbox *tb, int eh )
{
int height = pango_font_metrics_get_ascent ( tb->metrics ) + pango_font_metrics_get_descent ( tb->metrics );
- return ( eh * height ) / PANGO_SCALE + widget_padding_get_padding_height ( WIDGET ( tb ) );
+ return ceil(( eh * height ) / (double)PANGO_SCALE) + widget_padding_get_padding_height ( WIDGET ( tb ) );
}
int textbox_get_desired_width ( widget *wid )
{