Text is vertically centered if the icon is on the right
This commit is contained in:
parent
bc31a638f6
commit
cee294d911
3
x.c
3
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) {
|
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);
|
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 {
|
else {
|
||||||
cairo_move_to(c, settings.frame_width + settings.h_padding, bg_y + settings.padding);
|
cairo_move_to(c, settings.frame_width + settings.h_padding, bg_y + settings.padding);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user