diff options
author | 2018-05-09 07:42:51 -0400 | |
---|---|---|
committer | 2018-05-09 07:42:51 -0400 | |
commit | 98fe969e969b016a547a4a959e73c119c92ef731 (patch) | |
tree | e18c236f6984001e2fd8aced46b81f8c21502200 /swaybar/render.c | |
parent | Fix titles on rotated outputs (diff) | |
parent | Merge pull request #1944 from RyanDwyer/swaybar-respect-pango (diff) | |
download | sway-98fe969e969b016a547a4a959e73c119c92ef731.tar.gz sway-98fe969e969b016a547a4a959e73c119c92ef731.tar.zst sway-98fe969e969b016a547a4a959e73c119c92ef731.zip |
Merge branch 'master' into fix-title-scissor
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index 26248d35..327a6f5f 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -298,7 +298,7 @@ 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, true, "%s", mode); | 301 | output->scale, config->pango_markup, "%s", mode); |
302 | 302 | ||
303 | int ws_vertical_padding = WS_VERTICAL_PADDING * output->scale; | 303 | int ws_vertical_padding = WS_VERTICAL_PADDING * output->scale; |
304 | int ws_horizontal_padding = WS_HORIZONTAL_PADDING * output->scale; | 304 | int ws_horizontal_padding = WS_HORIZONTAL_PADDING * output->scale; |
@@ -329,7 +329,8 @@ static uint32_t render_binding_mode_indicator(cairo_t *cairo, | |||
329 | double text_y = height / 2.0 - text_height / 2.0; | 329 | double text_y = height / 2.0 - text_height / 2.0; |
330 | cairo_set_source_u32(cairo, config->colors.binding_mode.text); | 330 | 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)); | 331 | cairo_move_to(cairo, x + width / 2 - text_width / 2, (int)floor(text_y)); |
332 | pango_printf(cairo, config->font, output->scale, true, "%s", mode); | 332 | pango_printf(cairo, config->font, output->scale, config->pango_markup, |
333 | "%s", mode); | ||
333 | return surface_height; | 334 | return surface_height; |
334 | } | 335 | } |
335 | 336 | ||
@@ -374,7 +375,7 @@ static uint32_t render_workspace_button(cairo_t *cairo, | |||
374 | 375 | ||
375 | int text_width, text_height; | 376 | int text_width, text_height; |
376 | get_text_size(cairo, config->font, &text_width, &text_height, | 377 | get_text_size(cairo, config->font, &text_width, &text_height, |
377 | output->scale, true, "%s", name); | 378 | output->scale, config->pango_markup, "%s", name); |
378 | 379 | ||
379 | int ws_vertical_padding = WS_VERTICAL_PADDING * output->scale; | 380 | int ws_vertical_padding = WS_VERTICAL_PADDING * output->scale; |
380 | int ws_horizontal_padding = WS_HORIZONTAL_PADDING * output->scale; | 381 | int ws_horizontal_padding = WS_HORIZONTAL_PADDING * output->scale; |
@@ -406,7 +407,8 @@ static uint32_t render_workspace_button(cairo_t *cairo, | |||
406 | double text_y = height / 2.0 - text_height / 2.0; | 407 | double text_y = height / 2.0 - text_height / 2.0; |
407 | cairo_set_source_u32(cairo, box_colors.text); | 408 | cairo_set_source_u32(cairo, box_colors.text); |
408 | cairo_move_to(cairo, *x + width / 2 - text_width / 2, (int)floor(text_y)); | 409 | cairo_move_to(cairo, *x + width / 2 - text_width / 2, (int)floor(text_y)); |
409 | pango_printf(cairo, config->font, output->scale, true, "%s", name); | 410 | pango_printf(cairo, config->font, output->scale, config->pango_markup, |
411 | "%s", name); | ||
410 | 412 | ||
411 | struct swaybar_hotspot *hotspot = calloc(1, sizeof(struct swaybar_hotspot)); | 413 | struct swaybar_hotspot *hotspot = calloc(1, sizeof(struct swaybar_hotspot)); |
412 | hotspot->x = *x; | 414 | hotspot->x = *x; |