From cee294d911b758acfa214209c38f07185b4016ad Mon Sep 17 00:00:00 2001 From: tatou-tatou Date: Sat, 31 May 2014 16:42:18 +0200 Subject: [PATCH] Text is vertically centered if the icon is on the right --- x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x.c b/x.c index aa5dad4..e033d52 100644 --- a/x.c +++ b/x.c @@ -457,6 +457,9 @@ static dimension_t x_render_layout(cairo_t *c, colored_layout *cl, dimension_t d if (cl->icon && settings.icon_position == icons_left) { cairo_move_to(c, settings.frame_width + cairo_image_surface_get_width(cl->icon) + 2 * settings.h_padding, bg_y + settings.padding + h/2 - h_text/2); } + else if (cl->icon && settings.icon_position == icons_right) { + cairo_move_to(c, settings.frame_width + settings.h_padding, bg_y + settings.padding + h/2 - h_text/2); + } else { cairo_move_to(c, settings.frame_width + settings.h_padding, bg_y + settings.padding); }