diff options
author | 2021-09-14 13:19:02 -0500 | |
---|---|---|
committer | 2022-01-07 15:06:29 +0100 | |
commit | bb60381c7599677eb07b309fdbe418008201de44 (patch) | |
tree | c17a6a67f681b6b01791c1189c3690dcf4d89607 /swaybar/tray/tray.c | |
parent | input/seat: unset has_focus when focus_stack becomes empty (diff) | |
download | sway-bb60381c7599677eb07b309fdbe418008201de44.tar.gz sway-bb60381c7599677eb07b309fdbe418008201de44.tar.zst sway-bb60381c7599677eb07b309fdbe418008201de44.zip |
swaybar: fix tray_padding vs min-height re: scale
Co-authored-by: xdavidwu <xdavidwuph@gmail.com>
Diffstat (limited to 'swaybar/tray/tray.c')
-rw-r--r-- | swaybar/tray/tray.c | 4 |
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) { | |||
116 | } | 116 | } |
117 | } // else display on all | 117 | } // else display on all |
118 | 118 | ||
119 | if ((int) output->height*output->scale <= 2*config->tray_padding) { | 119 | if ((int)(output->height * output->scale) <= 2 * config->tray_padding) { |
120 | return 2*config->tray_padding + 1; | 120 | return (2 * config->tray_padding + 1) / output->scale; |
121 | } | 121 | } |
122 | 122 | ||
123 | uint32_t max_height = 0; | 123 | uint32_t max_height = 0; |