Skip to content

Commit

Permalink
Added newt colours
Browse files Browse the repository at this point in the history
Added colour pallete, set the colours and refreshed - this replaces the default magenta colour with a blue colour scheme.
  • Loading branch information
steveh250 committed Nov 1, 2020
1 parent f2c13ed commit 3b179f9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,33 @@ void helpCallback(newtComponent co, void * tag) {
newtWinMessage("Help", "Ok", tag);
}

/* Newt Color pallette*/
const struct newtColors newtDefaultColorPalette = {
"white", "blue", /* root fg, bg */
"black", "lightgray", /* border fg, bg */
"black", "lightgray", /* window fg, bg */
"white", "black", /* shadow fg, bg */
"red", "lightgray", /* title fg, bg */
"lightgray", "red", /* button fg, bg */
"red", "lightgray", /* active button fg, bg */
"lightgray", "blue", /* checkbox fg, bg */
"lightgray", "red", /* active checkbox fg, bg */
"lightgray", "blue", /* entry box fg, bg */
"blue", "lightgray", /* label fg, bg */
"black", "lightgray", /* listbox fg, bg */
"lightgray", "blue", /* active listbox fg, bg */
"black", "lightgray", /* textbox fg, bg */
"lightgray", "red", /* active textbox fg, bg */
"white", "blue", /* help line */
"lightgray", "blue", /* root text */
"blue", /* scale full */
"red", /* scale empty */
"blue", "lightgray", /* disabled entry fg, bg */
"black", "lightgray", /* compact button fg, bg */
"lightgray", "red", /* active & sel listbox */
"black", "brown" /* selected listbox */
};

/*BOTH - Menu file related settings*/
FILE * menu_file;
#define MENU_HEADING_LENGTH 80
Expand Down Expand Up @@ -347,6 +374,11 @@ int main(int argc, char * argv[]) {
newtInit();
newtCls();

/* Using the colour pallette define earlier - set the colours and refresh*/
newtSetColors(newtDefaultColorPalette);
newtRefresh();


/* Setup call backs */
newtSetSuspendCallback(suspend, NULL);
newtSetHelpCallback(helpCallback);
Expand Down

0 comments on commit 3b179f9

Please sign in to comment.