Improve Titles/Keybindings colors

This commit is contained in:
Kaian 2015-02-05 19:00:18 +01:00
parent 24eaf7f78e
commit d1527d04e6
3 changed files with 9 additions and 10 deletions

View File

@ -179,10 +179,10 @@ call_flow_draw(PANEL *panel)
} }
// Draw panel title // Draw panel title
wattron(win, COLOR_PAIR(CP_DEF_ON_CYAN)); wattron(win, A_BOLD | COLOR_PAIR(CP_DEF_ON_CYAN));
mvwprintw(win, 0, 0, "%*s", width, ""); mvwprintw(win, 0, 0, "%*s", width, "");
mvwprintw(win, 0, (width - strlen(title)) / 2, "%s", title); mvwprintw(win, 0, (width - strlen(title)) / 2, "%s", title);
wattroff(win, COLOR_PAIR(CP_DEF_ON_CYAN)); wattroff(win, A_BOLD | COLOR_PAIR(CP_DEF_ON_CYAN));
// Show some keybinding // Show some keybinding
call_flow_draw_footer(panel); call_flow_draw_footer(panel);

View File

@ -100,11 +100,11 @@ call_list_create()
// Draw the footer of the window // Draw the footer of the window
call_list_draw_footer(panel); call_list_draw_footer(panel);
wattron(win, COLOR_PAIR(CP_DEF_ON_CYAN)); wattron(win, A_BOLD | COLOR_PAIR(CP_DEF_ON_CYAN));
// Draw panel title // Draw panel title
mvwprintw(win, 0, 0, "%*s", width, ""); mvwprintw(win, 0, 0, "%*s", width, "");
mvwprintw(win, 0, (width - 45) / 2, "sngrep - SIP messages flow viewer"); mvwprintw(win, 0, (width - 45) / 2, "sngrep - SIP messages flow viewer");
wattroff(win, COLOR_PAIR(CP_DEF_ON_CYAN)); wattroff(win, A_BOLD | COLOR_PAIR(CP_DEF_ON_CYAN));
// Set defualt filter text if configured // Set defualt filter text if configured
if (get_option_value("cl.filter")) { if (get_option_value("cl.filter")) {
@ -208,7 +208,7 @@ call_list_draw(PANEL *panel)
} }
// Draw columns titles // Draw columns titles
wattron(win, COLOR_PAIR(CP_DEF_ON_CYAN)); wattron(win, A_BOLD |COLOR_PAIR(CP_DEF_ON_CYAN));
mvwprintw(win, 3, 0, "%*s", width, ""); mvwprintw(win, 3, 0, "%*s", width, "");
for (colpos = 6, i = 0; i < info->columncnt; i++) { for (colpos = 6, i = 0; i < info->columncnt; i++) {
// Get current column width // Get current column width
@ -222,7 +222,7 @@ call_list_draw(PANEL *panel)
mvwprintw(win, 3, colpos, "%.*s", collen, coldesc); mvwprintw(win, 3, colpos, "%.*s", collen, coldesc);
colpos += collen + 1; colpos += collen + 1;
} }
wattroff(win, COLOR_PAIR(CP_DEF_ON_CYAN)); wattroff(win, A_BOLD |COLOR_PAIR(CP_DEF_ON_CYAN));
// Get window of call list panel // Get window of call list panel
win = info->list_win; win = info->list_win;

View File

@ -445,15 +445,14 @@ draw_keybindings(PANEL *panel, const char *keybindings[], int count)
// Draw keys and their actions // Draw keys and their actions
for (key = 0; key < count; key += 2) { for (key = 0; key < count; key += 2) {
wattron(win, A_BOLD); wattron(win, A_BOLD | COLOR_PAIR(CP_DEF_ON_CYAN));
wattron(win, COLOR_PAIR(CP_DEF_ON_CYAN));
mvwprintw(win, height - 1, xpos, "%-*s", strlen(keybindings[key]) + 1, keybindings[key]); mvwprintw(win, height - 1, xpos, "%-*s", strlen(keybindings[key]) + 1, keybindings[key]);
wattroff(win, A_BOLD);
xpos += strlen(keybindings[key]) + 1; xpos += strlen(keybindings[key]) + 1;
wattroff(win, A_BOLD | COLOR_PAIR(CP_DEF_ON_CYAN));
wattron(win, COLOR_PAIR(CP_BLACK_ON_CYAN)); wattron(win, COLOR_PAIR(CP_BLACK_ON_CYAN));
mvwprintw(win, height - 1, xpos, "%-*s", strlen(keybindings[key + 1]) + 1, mvwprintw(win, height - 1, xpos, "%-*s", strlen(keybindings[key + 1]) + 1,
keybindings[key + 1]); keybindings[key + 1]);
wattroff(win, COLOR_PAIR(CP_DEF_ON_CYAN)); wattroff(win, COLOR_PAIR(CP_BLACK_ON_CYAN));
xpos += strlen(keybindings[key + 1]) + 3; xpos += strlen(keybindings[key + 1]) + 3;
} }
} }