mirror of https://github.com/davatorium/rofi.git
[TextBox] Fix centering with large padding
This commit is contained in:
parent
27d1da76b1
commit
a399adfa38
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue