swaybar: fix tray_padding vs min-height re: scale

Co-authored-by: xdavidwu <xdavidwuph@gmail.com>
This commit is contained in:
Nathan Schulte 2021-09-14 13:19:02 -05:00 committed by Simon Ser
parent 921b0a8633
commit bb60381c75

View file

@ -116,8 +116,8 @@ uint32_t render_tray(cairo_t *cairo, struct swaybar_output *output, double *x) {
} }
} // else display on all } // else display on all
if ((int) output->height*output->scale <= 2*config->tray_padding) { if ((int)(output->height * output->scale) <= 2 * config->tray_padding) {
return 2*config->tray_padding + 1; return (2 * config->tray_padding + 1) / output->scale;
} }
uint32_t max_height = 0; uint32_t max_height = 0;