diff options
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/render.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index 36df2d86..0d6bb354 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -263,7 +263,8 @@ static uint32_t render_status_block(cairo_t *cairo, | |||
263 | } else if (strncmp(block->align, "center", 6) == 0) { | 263 | } else if (strncmp(block->align, "center", 6) == 0) { |
264 | offset = x_pos + (width - text_width) / 2; | 264 | offset = x_pos + (width - text_width) / 2; |
265 | } | 265 | } |
266 | cairo_move_to(cairo, offset, height / 2.0 - text_height / 2.0); | 266 | double text_y = height / 2.0 - text_height / 2.0; |
267 | cairo_move_to(cairo, offset, (int)floor(text_y)); | ||
267 | uint32_t color = block->color ? *block->color : config->colors.statusline; | 268 | uint32_t color = block->color ? *block->color : config->colors.statusline; |
268 | color = block->urgent ? config->colors.urgent_workspace.text : color; | 269 | color = block->urgent ? config->colors.urgent_workspace.text : color; |
269 | cairo_set_source_u32(cairo, color); | 270 | cairo_set_source_u32(cairo, color); |
@@ -286,7 +287,8 @@ static uint32_t render_status_block(cairo_t *cairo, | |||
286 | } | 287 | } |
287 | if (config->sep_symbol) { | 288 | if (config->sep_symbol) { |
288 | offset = x_pos + (sep_block_width - sep_width) / 2; | 289 | offset = x_pos + (sep_block_width - sep_width) / 2; |
289 | cairo_move_to(cairo, offset, height / 2.0 - sep_height / 2.0); | 290 | double sep_y = height / 2.0 - sep_height / 2.0; |
291 | cairo_move_to(cairo, offset, (int)floor(sep_y)); | ||
290 | pango_printf(cairo, config->font, output->scale, false, | 292 | pango_printf(cairo, config->font, output->scale, false, |
291 | "%s", config->sep_symbol); | 293 | "%s", config->sep_symbol); |
292 | } else { | 294 | } else { |