aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/render.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-10 22:18:54 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-10 22:18:54 -0400
commit5785170421dc38437acde8bb61068cd16fda716c (patch)
tree66698bd0384180609c0714efb7bb42e7c9fe4bb9 /swaybar/render.c
parentMerge pull request #1792 from RyanDwyer/fix-swaybar-status-blocks (diff)
downloadsway-5785170421dc38437acde8bb61068cd16fda716c.tar.gz
sway-5785170421dc38437acde8bb61068cd16fda716c.tar.zst
sway-5785170421dc38437acde8bb61068cd16fda716c.zip
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.c6
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,
159 if (config->sep_symbol) { 159 if (config->sep_symbol) {
160 get_text_size(cairo, config->font, &sep_width, &sep_height, 160 get_text_size(cairo, config->font, &sep_width, &sep_height,
161 output->scale, false, "%s", config->sep_symbol); 161 output->scale, false, "%s", config->sep_symbol);
162 uint32_t _ideal_surface_height = ws_vertical_padding * 2 162 uint32_t _ideal_height = sep_height + ws_vertical_padding * 2;
163 + sep_height; 163 uint32_t _ideal_surface_height = _ideal_height / output->scale;
164 if (_ideal_surface_height > surface_height) { 164 if (surface_height < _ideal_surface_height) {
165 return _ideal_surface_height; 165 return _ideal_surface_height;
166 } 166 }
167 if (sep_width > block->separator_block_width) { 167 if (sep_width > block->separator_block_width) {