diff options
author | emersion <contact@emersion.fr> | 2018-10-20 22:52:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-20 22:52:56 +0200 |
commit | 3f02218b54645a68a7496eb15b7bb16d26b75ae2 (patch) | |
tree | 55fe01811bc8ac0785ce9798335bfd15553fa708 /swaybar/render.c | |
parent | Merge pull request #2900 from Hi-Angel/master (diff) | |
parent | swaybar: render with minimum height, nominally text height (diff) | |
download | sway-3f02218b54645a68a7496eb15b7bb16d26b75ae2.tar.gz sway-3f02218b54645a68a7496eb15b7bb16d26b75ae2.tar.zst sway-3f02218b54645a68a7496eb15b7bb16d26b75ae2.zip |
Merge pull request #2901 from ianyfan/swaybar1.0-beta.1
swaybar: render with minimum height, nominally text height
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index 097eb462..85e7542f 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -448,7 +448,9 @@ static uint32_t render_to_cairo(cairo_t *cairo, struct swaybar_output *output) { | |||
448 | } | 448 | } |
449 | cairo_paint(cairo); | 449 | cairo_paint(cairo); |
450 | 450 | ||
451 | uint32_t max_height = 0; | 451 | int th; |
452 | get_text_size(cairo, config->font, NULL, &th, NULL, output->scale, false, ""); | ||
453 | uint32_t max_height = (th + WS_VERTICAL_PADDING * 4) / output->scale; | ||
452 | /* | 454 | /* |
453 | * Each render_* function takes the actual height of the bar, and returns | 455 | * Each render_* function takes the actual height of the bar, and returns |
454 | * the ideal height. If the actual height is too short, the render function | 456 | * the ideal height. If the actual height is too short, the render function |