aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-07-06 16:22:13 +0100
committerLibravatar GitHub <noreply@github.com>2018-07-06 16:22:13 +0100
commitb3c55dd909b070625c9bfcebcb89cb8463e2ffc9 (patch)
tree714db24403e159b89cf5eaa59ddbd6cccd033947 /swaybar
parentpango/cairo: set default font map to NULL to free it (diff)
parentMerge pull request #2220 from ianyfan/remove-input-fix (diff)
downloadsway-b3c55dd909b070625c9bfcebcb89cb8463e2ffc9.tar.gz
sway-b3c55dd909b070625c9bfcebcb89cb8463e2ffc9.tar.zst
sway-b3c55dd909b070625c9bfcebcb89cb8463e2ffc9.zip
Merge branch 'master' into leaks
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/render.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/swaybar/render.c b/swaybar/render.c
index 327a6f5f..efd3fdeb 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -298,7 +298,8 @@ static uint32_t render_binding_mode_indicator(cairo_t *cairo,
298 298
299 int text_width, text_height; 299 int text_width, text_height;
300 get_text_size(cairo, config->font, &text_width, &text_height, 300 get_text_size(cairo, config->font, &text_width, &text_height,
301 output->scale, config->pango_markup, "%s", mode); 301 output->scale, config->mode_pango_markup,
302 "%s", mode);
302 303
303 int ws_vertical_padding = WS_VERTICAL_PADDING * output->scale; 304 int ws_vertical_padding = WS_VERTICAL_PADDING * output->scale;
304 int ws_horizontal_padding = WS_HORIZONTAL_PADDING * output->scale; 305 int ws_horizontal_padding = WS_HORIZONTAL_PADDING * output->scale;
@@ -329,7 +330,7 @@ static uint32_t render_binding_mode_indicator(cairo_t *cairo,
329 double text_y = height / 2.0 - text_height / 2.0; 330 double text_y = height / 2.0 - text_height / 2.0;
330 cairo_set_source_u32(cairo, config->colors.binding_mode.text); 331 cairo_set_source_u32(cairo, config->colors.binding_mode.text);
331 cairo_move_to(cairo, x + width / 2 - text_width / 2, (int)floor(text_y)); 332 cairo_move_to(cairo, x + width / 2 - text_width / 2, (int)floor(text_y));
332 pango_printf(cairo, config->font, output->scale, config->pango_markup, 333 pango_printf(cairo, config->font, output->scale, config->mode_pango_markup,
333 "%s", mode); 334 "%s", mode);
334 return surface_height; 335 return surface_height;
335} 336}