diff options
author | N-R-K <79544946+N-R-K@users.noreply.github.com> | 2022-02-26 17:38:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 17:38:53 +0100 |
commit | bda70867ac50c35b3bb134cf408ce5ae3cf0c751 (patch) | |
tree | e8380d33cf0f00bee892e6c66cc79649ef0c82d6 /window.c | |
parent | 9f12c79d1bfb64cbe006d26cc19af6c375cebbd1 (diff) | |
download | nsxiv-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 'window.c')
-rw-r--r-- | window.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -159,6 +159,7 @@ void win_init(win_t *win) win->bar.r.buf = emalloc(win->bar.r.size + 3); win->bar.r.buf[0] = '\0'; win->bar.h = options->hide_bar ? 0 : barheight; + win->bar.top = TOP_STATUSBAR; #endif /* HAVE_LIBFONTS */ XrmDestroyDatabase(db); @@ -445,12 +446,12 @@ static void win_draw_bar(win_t *win) return; e = &win->env; - y = win->h + font->ascent + V_TEXT_PAD; + y = (win->bar.top ? 0 : win->h) + font->ascent + V_TEXT_PAD; w = win->w - 2*H_TEXT_PAD; d = XftDrawCreate(e->dpy, win->buf.pm, e->vis, e->cmap); XSetForeground(e->dpy, gc, win->bar_bg.pixel); - XFillRectangle(e->dpy, win->buf.pm, gc, 0, win->h, win->w, win->bar.h); + XFillRectangle(e->dpy, win->buf.pm, gc, 0, win->bar.top ? 0 : win->h, win->w, win->bar.h); XSetForeground(e->dpy, gc, win->win_bg.pixel); XSetBackground(e->dpy, gc, win->bar_bg.pixel); |