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
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, (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
call_flow_draw_footer(panel);

View File

@ -100,11 +100,11 @@ call_list_create()
// Draw the footer of the window
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
mvwprintw(win, 0, 0, "%*s", width, "");
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
if (get_option_value("cl.filter")) {
@ -208,7 +208,7 @@ call_list_draw(PANEL *panel)
}
// 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, "");
for (colpos = 6, i = 0; i < info->columncnt; i++) {
// Get current column width
@ -222,7 +222,7 @@ call_list_draw(PANEL *panel)
mvwprintw(win, 3, colpos, "%.*s", collen, coldesc);
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
win = info->list_win;

View File

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