mirror of https://github.com/davatorium/rofi.git
[Textbox] Round estimated size up.
This commit is contained in:
parent
c6a405e840
commit
8be08007f8
|
@ -911,7 +911,7 @@ double textbox_get_estimated_ch ( void )
|
||||||
int textbox_get_estimated_height ( const textbox *tb, int eh )
|
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 );
|
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 )
|
int textbox_get_desired_width ( widget *wid )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue