mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 06:26:22 +00:00
Added more colour preferences
This commit is contained in:
@@ -56,10 +56,10 @@ create_status_bar(void)
|
||||
}
|
||||
|
||||
status_bar = newwin(1, cols, rows-2, 0);
|
||||
wbkgd(status_bar, COLOUR_BAR_DEF);
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wbkgd(status_bar, COLOUR_STATUS_TEXT);
|
||||
wattron(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwprintw(status_bar, 0, cols - 29, _active);
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_BRACKET);
|
||||
|
||||
last_time = g_date_time_new_now_local();
|
||||
|
||||
@@ -95,11 +95,11 @@ status_bar_resize(void)
|
||||
|
||||
mvwin(status_bar, rows-2, 0);
|
||||
wresize(status_bar, 1, cols);
|
||||
wbkgd(status_bar, COLOUR_BAR_DEF);
|
||||
wbkgd(status_bar, COLOUR_STATUS_TEXT);
|
||||
wclear(status_bar);
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wattron(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwprintw(status_bar, 0, cols - 29, _active);
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_BRACKET);
|
||||
|
||||
for(i = 0; i < 9; i++) {
|
||||
if (is_new[i])
|
||||
@@ -142,12 +142,12 @@ status_bar_active(const int win)
|
||||
|
||||
int cols = getmaxx(stdscr);
|
||||
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wattron(status_bar, COLOUR_STATUS_ACTIVE);
|
||||
if (win < 9)
|
||||
mvwprintw(status_bar, 0, cols - 29 + active_pos, "%d", win+1);
|
||||
else
|
||||
mvwprintw(status_bar, 0, cols - 29 + active_pos, "10");
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_ACTIVE);
|
||||
|
||||
dirty = TRUE;
|
||||
}
|
||||
@@ -162,13 +162,13 @@ status_bar_new(const int win)
|
||||
|
||||
int cols = getmaxx(stdscr);
|
||||
|
||||
wattron(status_bar, COLOUR_BAR_TEXT);
|
||||
wattron(status_bar, COLOUR_STATUS_NEW);
|
||||
wattron(status_bar, A_BLINK);
|
||||
if (win < 9)
|
||||
mvwprintw(status_bar, 0, cols - 29 + active_pos, "%d", win+1);
|
||||
else
|
||||
mvwprintw(status_bar, 0, cols - 29 + active_pos, "10");
|
||||
wattroff(status_bar, COLOUR_BAR_TEXT);
|
||||
wattroff(status_bar, COLOUR_STATUS_NEW);
|
||||
wattroff(status_bar, A_BLINK);
|
||||
|
||||
dirty = TRUE;
|
||||
@@ -197,9 +197,9 @@ status_bar_print_message(const char * const msg)
|
||||
|
||||
int cols = getmaxx(stdscr);
|
||||
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wattron(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwprintw(status_bar, 0, cols - 29, _active);
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_BRACKET);
|
||||
|
||||
int i;
|
||||
for(i = 0; i < 9; i++) {
|
||||
@@ -230,9 +230,9 @@ status_bar_clear(void)
|
||||
|
||||
int cols = getmaxx(stdscr);
|
||||
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wattron(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwprintw(status_bar, 0, cols - 29, _active);
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_BRACKET);
|
||||
|
||||
dirty = TRUE;
|
||||
}
|
||||
@@ -249,9 +249,9 @@ status_bar_clear_message(void)
|
||||
|
||||
int cols = getmaxx(stdscr);
|
||||
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wattron(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwprintw(status_bar, 0, cols - 29, _active);
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_BRACKET);
|
||||
|
||||
int i;
|
||||
for(i = 0; i < 9; i++) {
|
||||
@@ -269,13 +269,13 @@ _status_bar_update_time(void)
|
||||
{
|
||||
gchar *date_fmt = g_date_time_format(last_time, "%H:%M");
|
||||
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wattron(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwaddch(status_bar, 0, 1, '[');
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwprintw(status_bar, 0, 2, date_fmt);
|
||||
wattron(status_bar, COLOUR_BAR_DRAW);
|
||||
wattron(status_bar, COLOUR_STATUS_BRACKET);
|
||||
mvwaddch(status_bar, 0, 7, ']');
|
||||
wattroff(status_bar, COLOUR_BAR_DRAW);
|
||||
wattroff(status_bar, COLOUR_STATUS_BRACKET);
|
||||
|
||||
free(date_fmt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user