From dc6e13b39ba2190d7f11378be48f8ccfe10d47f6 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 21 May 2022 13:42:44 +0200 Subject: Add an option to invert the window bars instead of coloring them --- vchat-ui.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'vchat-ui.c') diff --git a/vchat-ui.c b/vchat-ui.c index a55f7f8..62ef372 100755 --- a/vchat-ui.c +++ b/vchat-ui.c @@ -1150,17 +1150,27 @@ initui (void) /* set colors for windows */ if (has_colors()) { - wattrset (console, COLOR_PAIR (9)); + if (getintoption(CF_INVWINBAR)) { + wbkgd (console, COLOR_PAIR (0)); + wattron (console, A_REVERSE); + } else { + wattrset (console, COLOR_PAIR (9)); + wbkgd (console, COLOR_PAIR (9)); + } wattrset (input, COLOR_PAIR (0)); wbkgd (output, COLOR_PAIR(8)); - wbkgd (console, COLOR_PAIR (9)); wbkgd (channel, COLOR_PAIR (0)); wbkgd (input, COLOR_PAIR (0)); if (private) wbkgd (private, COLOR_PAIR (0)); - if( topic ) { - wattrset (topic, COLOR_PAIR (9)); - wbkgd (topic, COLOR_PAIR (9)); + if (topic) { + if (getintoption(CF_INVWINBAR)) { + wbkgd (input, COLOR_PAIR (0)); + wattron(topic, A_REVERSE); + } else { + wattrset (topic, COLOR_PAIR (9)); + wbkgd (topic, COLOR_PAIR (9)); + } } } else { wattron (console, A_REVERSE); -- cgit v1.2.3