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>
This commit is contained in:
N-R-K
2022-02-26 16:38:53 +00:00
committed by GitHub
parent 9f12c79d1b
commit bda70867ac
5 changed files with 11 additions and 5 deletions

View File

@ -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);
}