diff options
author | v44r <[email protected]> | 2019-01-31 10:45:12 +0100 |
---|---|---|
committer | emersion <[email protected]> | 2019-01-31 15:37:57 +0100 |
commit | 204e1f47122d5a48865802dd1fb94fe0f05c2401 (patch) | |
tree | 313dd04af04ccdbbca2c8292e1b304a0ffb89ba7 /swaybar/render.c | |
parent | 1049f360e1d2eae1eb2c1306ca6320a5a9172810 (diff) |
Rebase #1636 against current master
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index e27f7d4c..116cc595 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -159,6 +159,12 @@ static uint32_t render_status_block(cairo_t *cairo, double ws_vertical_padding = config->status_padding * output->scale; int width = text_width; + if (block->min_width_str) { + int w; + get_text_size(cairo, config->font, &w, NULL, NULL, + output->scale, block->markup, "%s", block->min_width_str); + block->min_width = w; + } if (width < block->min_width) { width = block->min_width; } |