summaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorNathan Schulte <[email protected]>2021-09-14 13:19:02 -0500
committerSimon Ser <[email protected]>2022-01-07 15:09:24 +0100
commitec9e4630e08f7da00f3785ae1b1e0e52c2c8f993 (patch)
tree4308bcf4a821c389dce02e583997f24c0f809825 /swaybar
parenta235794a96884fa5619790316251f7d5e53e3d2d (diff)
swaybar: fix tray_padding vs min-height re: scale
Co-authored-by: xdavidwu <[email protected]> (cherry picked from commit bb60381c7599677eb07b309fdbe418008201de44)
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/tray/tray.c4
1 files 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;