Remove unneeded addition/removal of margin.

This commit is contained in:
Dave Davenport 2015-03-20 08:27:33 +01:00
parent 3df30438b1
commit b882d9ab72

View file

@ -289,7 +289,7 @@ void textbox_draw ( textbox *tb )
int tw = textbox_get_font_width ( tb ); int tw = textbox_get_font_width ( tb );
x = ( PANGO_SCALE * ( tb->w - tw - 2 * SIDE_MARGIN ) ) / 2; x = ( PANGO_SCALE * ( tb->w - tw - 2 * SIDE_MARGIN ) ) / 2;
} }
y = ( PANGO_SCALE * ( tb->h - textbox_get_height ( tb ) + 2 * SIDE_MARGIN ) ) / 2; y = ( PANGO_SCALE * ( tb->h - textbox_get_font_height ( tb ) ) ) / 2;
// Render the layout. // Render the layout.
pango_xft_render_layout ( draw, &( tb->color_fg ), tb->layout, x, y ); pango_xft_render_layout ( draw, &( tb->color_fg ), tb->layout, x, y );