aboutsummaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorArthur Williams <taaparthur@gmail.com>2021-09-19 10:49:56 +0200
committerNRK <nrk@disroot.org>2021-10-09 22:17:50 +0200
commit675db4bbb646ff51cc3ecc8ba7d587670872580a (patch)
treef0536022677edf2968f770a0dc67a02e074d8b69 /thumbs.c
parent6ce94e3e3b8cccab0a5cc23c7538ad19626c1c1d (diff)
downloadnsxiv-675db4bbb646ff51cc3ecc8ba7d587670872580a.tar.zst
Make statusbar optional (#95)
libXft and libfontconfig are now optional dependencies which can be disabled via `HAVE_LIBFONTS=0`. Disabling them means disabling the statusbar. This also does not search for freetype2 header if disabled. Co-authored-by: NRK <nrk@disroot.org>
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thumbs.c b/thumbs.c
index 40cd6bd..059ae95 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -471,14 +471,14 @@ void tns_mark(tns_t *tns, int n, bool mark)
if (n >= 0 && n < *tns->cnt && tns->thumbs[n].im != NULL) {
win_t *win = tns->win;
thumb_t *t = &tns->thumbs[n];
- unsigned long col = win->win_bg.pixel;
+ unsigned long col = win->win_bg;
int x = t->x + t->w, y = t->y + t->h;
win_draw_rect(win, x - 1, y + 1, 1, tns->bw, true, 1, col);
win_draw_rect(win, x + 1, y - 1, tns->bw, 1, true, 1, col);
if (mark)
- col = win->mrk_fg.pixel;
+ col = win->mrk_fg;
win_draw_rect(win, x, y, tns->bw + 2, tns->bw + 2, true, 1, col);
@@ -492,7 +492,7 @@ void tns_highlight(tns_t *tns, int n, bool hl)
if (n >= 0 && n < *tns->cnt && tns->thumbs[n].im != NULL) {
win_t *win = tns->win;
thumb_t *t = &tns->thumbs[n];
- unsigned long col = hl ? win->win_fg.pixel : win->win_bg.pixel;
+ unsigned long col = hl ? win->win_fg : win->win_bg;
int oxy = (tns->bw + 1) / 2 + 1, owh = tns->bw + 2;
win_draw_rect(win, t->x - oxy, t->y - oxy, t->w + owh, t->h + owh,