From a399adfa385eb08178adefa2fbcc0970251b8f70 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 6 Jun 2017 09:28:36 +0200 Subject: [PATCH] [TextBox] Fix centering with large padding --- source/widgets/textbox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 70736179..87f1a57a 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -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 );