diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-07-05 18:12:14 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-07-05 18:12:14 -0400 |
commit | 78c08fb0a281cbe74c56f0a2ea4b9370b9372661 (patch) | |
tree | 3fc34f67deb2988a1dcd1bf06f0798ada07333b8 /swaybar/render.c | |
parent | Merge pull request #2185 from swaywm/update-wlroots-1076 (diff) | |
download | sway-78c08fb0a281cbe74c56f0a2ea4b9370b9372661.tar.gz sway-78c08fb0a281cbe74c56f0a2ea4b9370b9372661.tar.zst sway-78c08fb0a281cbe74c56f0a2ea4b9370b9372661.zip |
Implement mode --pango_markup
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 5 |
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 | } |