From bb60381c7599677eb07b309fdbe418008201de44 Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Tue, 14 Sep 2021 13:19:02 -0500 Subject: [PATCH] swaybar: fix tray_padding vs min-height re: scale Co-authored-by: xdavidwu --- swaybar/tray/tray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swaybar/tray/tray.c b/swaybar/tray/tray.c index 5fe6f9c3..b0545f4a 100644 --- a/swaybar/tray/tray.c +++ b/swaybar/tray/tray.c @@ -116,8 +116,8 @@ uint32_t render_tray(cairo_t *cairo, struct swaybar_output *output, double *x) { } } // else display on all - if ((int) output->height*output->scale <= 2*config->tray_padding) { - return 2*config->tray_padding + 1; + if ((int)(output->height * output->scale) <= 2 * config->tray_padding) { + return (2 * config->tray_padding + 1) / output->scale; } uint32_t max_height = 0;