aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/render.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-11 08:34:21 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-11 08:34:21 +1000
commit7dfc0409ebd14f256294118ded769cf4df56e758 (patch)
treea3ae8885faac7f09475e93050076863b0eb0b101 /swaybar/render.c
parentFix swaybar not showing all status blocks. (diff)
downloadsway-7dfc0409ebd14f256294118ded769cf4df56e758.tar.gz
sway-7dfc0409ebd14f256294118ded769cf4df56e758.tar.zst
sway-7dfc0409ebd14f256294118ded769cf4df56e758.zip
Check height in surface local coordinates and rename some variables.
Diffstat (limited to 'swaybar/render.c')
-rw-r--r--swaybar/render.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/swaybar/render.c b/swaybar/render.c
index 8681532a..3fd8da0b 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -159,9 +159,10 @@ 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_height = sep_height + ws_vertical_padding * 2; 162 uint32_t _ideal_surface_height = ws_vertical_padding * 2
163 if (_ideal_height * output->scale > height) { 163 + sep_height;
164 return _ideal_height; 164 if (_ideal_surface_height > surface_height) {
165 return _ideal_surface_height;
165 } 166 }
166 if (sep_width > block->separator_block_width) { 167 if (sep_width > block->separator_block_width) {
167 block->separator_block_width = sep_width + margin * 2; 168 block->separator_block_width = sep_width + margin * 2;