diff options
author | 2021-09-13 14:07:27 +0200 | |
---|---|---|
committer | 2021-09-13 14:22:51 +0200 | |
commit | 3f7a04df22b304f10eede8cea2f0d2ceae659069 (patch) | |
tree | c2be58823b6695969bd2aa5d5b9682c55e7969e7 /swaybar/render.c | |
parent | readme: link to gamja for IRC (diff) | |
download | sway-3f7a04df22b304f10eede8cea2f0d2ceae659069.tar.gz sway-3f7a04df22b304f10eede8cea2f0d2ceae659069.tar.zst sway-3f7a04df22b304f10eede8cea2f0d2ceae659069.zip |
Rename pango_printf to render_text
This avoids using the pango_ prefix, reserved for functions coming
from the Pango library.
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index 5f89d0c9..de468b4f 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -77,7 +77,7 @@ static uint32_t render_status_line_error(struct render_context *ctx, double *x) | |||
77 | double text_y = height / 2.0 - text_height / 2.0; | 77 | double text_y = height / 2.0 - text_height / 2.0; |
78 | cairo_move_to(cairo, *x, (int)floor(text_y)); | 78 | cairo_move_to(cairo, *x, (int)floor(text_y)); |
79 | choose_text_aa_mode(ctx, 0xFF0000FF); | 79 | choose_text_aa_mode(ctx, 0xFF0000FF); |
80 | pango_printf(cairo, font, 1, false, "%s", error); | 80 | render_text(cairo, font, 1, false, "%s", error); |
81 | *x -= margin; | 81 | *x -= margin; |
82 | return output->height; | 82 | return output->height; |
83 | } | 83 | } |
@@ -114,7 +114,7 @@ static uint32_t render_status_line_text(struct render_context *ctx, double *x) { | |||
114 | double text_y = height / 2.0 - text_height / 2.0; | 114 | double text_y = height / 2.0 - text_height / 2.0; |
115 | cairo_move_to(cairo, *x, (int)floor(text_y)); | 115 | cairo_move_to(cairo, *x, (int)floor(text_y)); |
116 | choose_text_aa_mode(ctx, fontcolor); | 116 | choose_text_aa_mode(ctx, fontcolor); |
117 | pango_printf(cairo, config->font, 1, config->pango_markup, "%s", text); | 117 | render_text(cairo, config->font, 1, config->pango_markup, "%s", text); |
118 | *x -= margin; | 118 | *x -= margin; |
119 | return output->height; | 119 | return output->height; |
120 | } | 120 | } |
@@ -304,7 +304,7 @@ static uint32_t render_status_block(struct render_context *ctx, | |||
304 | color = block->urgent ? config->colors.urgent_workspace.text : color; | 304 | color = block->urgent ? config->colors.urgent_workspace.text : color; |
305 | cairo_set_source_u32(cairo, color); | 305 | cairo_set_source_u32(cairo, color); |
306 | choose_text_aa_mode(ctx, color); | 306 | choose_text_aa_mode(ctx, color); |
307 | pango_printf(cairo, config->font, 1, block->markup, "%s", text); | 307 | render_text(cairo, config->font, 1, block->markup, "%s", text); |
308 | x_pos += width; | 308 | x_pos += width; |
309 | 309 | ||
310 | if (block->border && block->border_right > 0) { | 310 | if (block->border && block->border_right > 0) { |
@@ -326,7 +326,7 @@ static uint32_t render_status_block(struct render_context *ctx, | |||
326 | double sep_y = height / 2.0 - sep_height / 2.0; | 326 | double sep_y = height / 2.0 - sep_height / 2.0; |
327 | cairo_move_to(cairo, offset, (int)floor(sep_y)); | 327 | cairo_move_to(cairo, offset, (int)floor(sep_y)); |
328 | choose_text_aa_mode(ctx, color); | 328 | choose_text_aa_mode(ctx, color); |
329 | pango_printf(cairo, config->font, 1, false, | 329 | render_text(cairo, config->font, 1, false, |
330 | "%s", config->sep_symbol); | 330 | "%s", config->sep_symbol); |
331 | } else { | 331 | } else { |
332 | cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); | 332 | cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); |
@@ -587,7 +587,7 @@ static uint32_t render_binding_mode_indicator(struct render_context *ctx, | |||
587 | cairo_set_source_u32(cairo, config->colors.binding_mode.text); | 587 | cairo_set_source_u32(cairo, config->colors.binding_mode.text); |
588 | cairo_move_to(cairo, x + width / 2 - text_width / 2, (int)floor(text_y)); | 588 | cairo_move_to(cairo, x + width / 2 - text_width / 2, (int)floor(text_y)); |
589 | choose_text_aa_mode(ctx, config->colors.binding_mode.text); | 589 | choose_text_aa_mode(ctx, config->colors.binding_mode.text); |
590 | pango_printf(cairo, config->font, 1, output->bar->mode_pango_markup, | 590 | render_text(cairo, config->font, 1, output->bar->mode_pango_markup, |
591 | "%s", mode); | 591 | "%s", mode); |
592 | return output->height; | 592 | return output->height; |
593 | } | 593 | } |
@@ -661,7 +661,7 @@ static uint32_t render_workspace_button(struct render_context *ctx, | |||
661 | cairo_set_source_u32(cairo, box_colors.text); | 661 | cairo_set_source_u32(cairo, box_colors.text); |
662 | cairo_move_to(cairo, *x + width / 2 - text_width / 2, (int)floor(text_y)); | 662 | cairo_move_to(cairo, *x + width / 2 - text_width / 2, (int)floor(text_y)); |
663 | choose_text_aa_mode(ctx, box_colors.text); | 663 | choose_text_aa_mode(ctx, box_colors.text); |
664 | pango_printf(cairo, config->font, 1, config->pango_markup, | 664 | render_text(cairo, config->font, 1, config->pango_markup, |
665 | "%s", ws->label); | 665 | "%s", ws->label); |
666 | 666 | ||
667 | struct swaybar_hotspot *hotspot = calloc(1, sizeof(struct swaybar_hotspot)); | 667 | struct swaybar_hotspot *hotspot = calloc(1, sizeof(struct swaybar_hotspot)); |