summaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorN-R-K <79544946+N-R-K@users.noreply.github.com>2022-02-26 17:38:53 +0100
committerGitHub <noreply@github.com>2022-02-26 17:38:53 +0100
commitbda70867ac50c35b3bb134cf408ce5ae3cf0c751 (patch)
treee8380d33cf0f00bee892e6c66cc79649ef0c82d6 /image.c
parent9f12c79d1bfb64cbe006d26cc19af6c375cebbd1 (diff)
downloadnsxiv-bda70867ac50c35b3bb134cf408ce5ae3cf0c751.tar.zst
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>
Diffstat (limited to 'image.c')
-rw-r--r--image.c4
1 files changed, 2 insertions, 2 deletions
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);
}