[TextBox] Fix centering with large padding

This commit is contained in:
Dave Davenport 2017-06-06 09:28:36 +02:00
parent 27d1da76b1
commit a399adfa38
1 changed files with 1 additions and 0 deletions

View File

@ -448,6 +448,7 @@ static void textbox_draw ( widget *wid, cairo_t *draw )
else if ( tb->flags & TB_CENTER ) {
int tw = textbox_get_font_width ( tb );
x = ( ( tb->widget.w - tw - widget_padding_get_padding_width ( WIDGET ( tb ) ) - offset ) ) / 2;
x += widget_padding_get_left ( WIDGET (tb) ) ;
}
// TODO check if this is still needed after flatning.
cairo_set_operator ( draw, CAIRO_OPERATOR_OVER );