sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 5785170421dc38437acde8bb61068cd16fda716c
parent 84243a708e1f2bb6db6b04550b798dea5a5049d6
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 10 Apr 2018 22:18:54 -0400

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:
Mswaybar/render.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 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) {