aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/render.c
diff options
context:
space:
mode:
authorLibravatar v44r <dv@v44r.com>2019-01-31 10:45:12 +0100
committerLibravatar emersion <contact@emersion.fr>2019-01-31 15:37:57 +0100
commit204e1f47122d5a48865802dd1fb94fe0f05c2401 (patch)
tree313dd04af04ccdbbca2c8292e1b304a0ffb89ba7 /swaybar/render.c
parentreadme: scdoc 1.8.1 is now required (diff)
downloadsway-204e1f47122d5a48865802dd1fb94fe0f05c2401.tar.gz
sway-204e1f47122d5a48865802dd1fb94fe0f05c2401.tar.zst
sway-204e1f47122d5a48865802dd1fb94fe0f05c2401.zip
Rebase #1636 against current master
Diffstat (limited to 'swaybar/render.c')
-rw-r--r--swaybar/render.c6
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,
159 double ws_vertical_padding = config->status_padding * output->scale; 159 double ws_vertical_padding = config->status_padding * output->scale;
160 160
161 int width = text_width; 161 int width = text_width;
162 if (block->min_width_str) {
163 int w;
164 get_text_size(cairo, config->font, &w, NULL, NULL,
165 output->scale, block->markup, "%s", block->min_width_str);
166 block->min_width = w;
167 }
162 if (width < block->min_width) { 168 if (width < block->min_width) {
163 width = block->min_width; 169 width = block->min_width;
164 } 170 }