diff options
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index fff47ab0..3eb824fe 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -136,7 +136,7 @@ static void render_block(struct window *window, struct config *config, struct st | |||
136 | 136 | ||
137 | cairo_move_to(window->cairo, offset, margin); | 137 | cairo_move_to(window->cairo, offset, margin); |
138 | cairo_set_source_u32(window->cairo, block->color); | 138 | cairo_set_source_u32(window->cairo, block->color); |
139 | pango_printf(window->cairo, window->font, "%s", block->full_text); | 139 | pango_printf(window->cairo, window->font, block->markup, "%s", block->full_text); |
140 | 140 | ||
141 | pos += width; | 141 | pos += width; |
142 | 142 | ||
@@ -159,7 +159,7 @@ static void render_block(struct window *window, struct config *config, struct st | |||
159 | if (config->sep_symbol) { | 159 | if (config->sep_symbol) { |
160 | offset = pos + (block->separator_block_width - sep_width) / 2; | 160 | offset = pos + (block->separator_block_width - sep_width) / 2; |
161 | cairo_move_to(window->cairo, offset, margin); | 161 | cairo_move_to(window->cairo, offset, margin); |
162 | pango_printf(window->cairo, window->font, "%s", config->sep_symbol); | 162 | pango_printf(window->cairo, window->font, false, "%s", config->sep_symbol); |
163 | } else { | 163 | } else { |
164 | cairo_set_line_width(window->cairo, 1); | 164 | cairo_set_line_width(window->cairo, 1); |
165 | cairo_move_to(window->cairo, pos + block->separator_block_width/2, | 165 | cairo_move_to(window->cairo, pos + block->separator_block_width/2, |
@@ -228,7 +228,7 @@ static void render_workspace_button(struct window *window, struct config *config | |||
228 | // text | 228 | // text |
229 | cairo_set_source_u32(window->cairo, box_colors.text); | 229 | cairo_set_source_u32(window->cairo, box_colors.text); |
230 | cairo_move_to(window->cairo, (int)*x + ws_horizontal_padding, margin); | 230 | cairo_move_to(window->cairo, (int)*x + ws_horizontal_padding, margin); |
231 | pango_printf(window->cairo, window->font, "%s", name); | 231 | pango_printf(window->cairo, window->font, false, "%s", name); |
232 | 232 | ||
233 | *x += width + ws_horizontal_padding * 2 + ws_spacing; | 233 | *x += width + ws_horizontal_padding * 2 + ws_spacing; |
234 | 234 | ||
@@ -254,7 +254,7 @@ static void render_binding_mode_indicator(struct window *window, struct config * | |||
254 | // text | 254 | // text |
255 | cairo_set_source_u32(window->cairo, config->colors.binding_mode.text); | 255 | cairo_set_source_u32(window->cairo, config->colors.binding_mode.text); |
256 | cairo_move_to(window->cairo, (int)pos + ws_horizontal_padding, margin); | 256 | cairo_move_to(window->cairo, (int)pos + ws_horizontal_padding, margin); |
257 | pango_printf(window->cairo, window->font, "%s", config->mode); | 257 | pango_printf(window->cairo, window->font, false, "%s", config->mode); |
258 | } | 258 | } |
259 | 259 | ||
260 | void render(struct output *output, struct config *config, struct status_line *line) { | 260 | void render(struct output *output, struct config *config, struct status_line *line) { |
@@ -280,7 +280,7 @@ void render(struct output *output, struct config *config, struct status_line *li | |||
280 | if (line->protocol == TEXT) { | 280 | if (line->protocol == TEXT) { |
281 | get_text_size(window->cairo, window->font, &width, &height, "%s", line->text_line); | 281 | get_text_size(window->cairo, window->font, &width, &height, "%s", line->text_line); |
282 | cairo_move_to(cairo, window->width - margin - width, margin); | 282 | cairo_move_to(cairo, window->width - margin - width, margin); |
283 | pango_printf(window->cairo, window->font, "%s", line->text_line); | 283 | pango_printf(window->cairo, window->font, true, "%s", line->text_line); |
284 | } else if (line->protocol == I3BAR && line->block_line) { | 284 | } else if (line->protocol == I3BAR && line->block_line) { |
285 | double pos = window->width - 0.5; | 285 | double pos = window->width - 0.5; |
286 | bool edge = true; | 286 | bool edge = true; |
@@ -312,7 +312,8 @@ void render(struct output *output, struct config *config, struct status_line *li | |||
312 | 312 | ||
313 | void set_window_height(struct window *window, int height) { | 313 | void set_window_height(struct window *window, int height) { |
314 | int text_width, text_height; | 314 | int text_width, text_height; |
315 | get_text_size(window->cairo, window->font, &text_width, &text_height, "Test string for measuring purposes"); | 315 | get_text_size(window->cairo, window->font, &text_width, &text_height, false, |
316 | "Test string for measuring purposes"); | ||
316 | if (height > 0) { | 317 | if (height > 0) { |
317 | margin = (height - text_height) / 2; | 318 | margin = (height - text_height) / 2; |
318 | ws_vertical_padding = margin - 1.5; | 319 | ws_vertical_padding = margin - 1.5; |