From f7557c55b5a87a51daba825ed3f6155eed179221 Mon Sep 17 00:00:00 2001 From: Guilherme Freire <41879254+GRFreire@users.noreply.github.com> Date: Sat, 11 Sep 2021 11:38:22 -0300 Subject: Custom bar colors (#10) * set bar and text colors independently * change xresources to Program.class.resource * rename color variables to win/bar_bg/fg * change default bar colors to match window colors --- thumbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'thumbs.c') diff --git a/thumbs.c b/thumbs.c index 36874d6..4238aa0 100644 --- a/thumbs.c +++ b/thumbs.c @@ -469,14 +469,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->bg.pixel; + unsigned long col = win->win_bg.pixel; 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->fg.pixel; + col = win->win_fg.pixel; win_draw_rect(win, x, y, tns->bw + 2, tns->bw + 2, true, 1, col); @@ -490,7 +490,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->fg.pixel : win->bg.pixel; + unsigned long col = hl ? win->win_fg.pixel : win->win_bg.pixel; 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, -- cgit v1.2.3