From bda70867ac50c35b3bb134cf408ce5ae3cf0c751 Mon Sep 17 00:00:00 2001 From: N-R-K <79544946+N-R-K@users.noreply.github.com> Date: Sat, 26 Feb 2022 16:38:53 +0000 Subject: add config.h option for top statusbar (#231) Closes: https://github.com/nsxiv/nsxiv/issues/230 Co-authored-by: mamg22 <45301823+mamg22@users.noreply.github.com> --- image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'image.c') diff --git a/image.c b/image.c index ade9494..1c57d27 100644 --- a/image.c +++ b/image.c @@ -589,12 +589,12 @@ void img_render(img_t *img) if (img->y <= 0) { sy = -img->y / img->zoom + 0.5; sh = win->h / img->zoom; - dy = 0; + dy = win->bar.top ? win->bar.h : 0; dh = win->h; } else { sy = 0; sh = img->h; - dy = img->y; + dy = img->y + (win->bar.top ? win->bar.h : 0); dh = MAX(img->h * img->zoom, 1); } -- cgit v1.2.3