diff options
author | 2018-07-06 04:57:46 -0700 | |
---|---|---|
committer | 2018-07-06 04:57:46 -0700 | |
commit | a06d45a14d1f222a42d23bf1f49bb6995dc3b27b (patch) | |
tree | 6589d60a90583e11cfeb5117e45cdef997bf56f9 /swaybar/render.c | |
parent | Merge pull request #2219 from RedSoxFan/fix-2111 (diff) | |
parent | Implement mode --pango_markup (diff) | |
download | sway-a06d45a14d1f222a42d23bf1f49bb6995dc3b27b.tar.gz sway-a06d45a14d1f222a42d23bf1f49bb6995dc3b27b.tar.zst sway-a06d45a14d1f222a42d23bf1f49bb6995dc3b27b.zip |
Merge pull request #2217 from RedSoxFan/fix-663
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 | } |