diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2018-04-10 22:18:54 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2018-04-10 22:18:54 -0400 |
| commit | 0cb0c52663a8e27f632988da0f91e4cfb6afddf8 (patch) | |
| tree | 66698bd0384180609c0714efb7bb42e7c9fe4bb9 /swaybar/render.c | |
| parent | ddc8b9a1b5249c9f9571756185775a5634953fc7 (diff) | |
Fix separator height calculation
Fixes #1796
Also rearranged this code to more closely mirror the similar code above
so future discrepancies are easier to spot.
Diffstat (limited to 'swaybar/render.c')
| -rw-r--r-- | swaybar/render.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index 3fd8da0b..26248d35 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -159,9 +159,9 @@ static uint32_t render_status_block(cairo_t *cairo, if (config->sep_symbol) { get_text_size(cairo, config->font, &sep_width, &sep_height, output->scale, false, "%s", config->sep_symbol); - uint32_t _ideal_surface_height = ws_vertical_padding * 2 - + sep_height; - if (_ideal_surface_height > surface_height) { + uint32_t _ideal_height = sep_height + ws_vertical_padding * 2; + uint32_t _ideal_surface_height = _ideal_height / output->scale; + if (surface_height < _ideal_surface_height) { return _ideal_surface_height; } if (sep_width > block->separator_block_width) { |
