Skip to content

Commit 3b179f9

Browse files
committed
Added newt colours
Added colour pallete, set the colours and refreshed - this replaces the default magenta colour with a blue colour scheme.
1 parent f2c13ed commit 3b179f9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

menu.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,33 @@ void helpCallback(newtComponent co, void * tag) {
150150
newtWinMessage("Help", "Ok", tag);
151151
}
152152

153+
/* Newt Color pallette*/
154+
const struct newtColors newtDefaultColorPalette = {
155+
"white", "blue", /* root fg, bg */
156+
"black", "lightgray", /* border fg, bg */
157+
"black", "lightgray", /* window fg, bg */
158+
"white", "black", /* shadow fg, bg */
159+
"red", "lightgray", /* title fg, bg */
160+
"lightgray", "red", /* button fg, bg */
161+
"red", "lightgray", /* active button fg, bg */
162+
"lightgray", "blue", /* checkbox fg, bg */
163+
"lightgray", "red", /* active checkbox fg, bg */
164+
"lightgray", "blue", /* entry box fg, bg */
165+
"blue", "lightgray", /* label fg, bg */
166+
"black", "lightgray", /* listbox fg, bg */
167+
"lightgray", "blue", /* active listbox fg, bg */
168+
"black", "lightgray", /* textbox fg, bg */
169+
"lightgray", "red", /* active textbox fg, bg */
170+
"white", "blue", /* help line */
171+
"lightgray", "blue", /* root text */
172+
"blue", /* scale full */
173+
"red", /* scale empty */
174+
"blue", "lightgray", /* disabled entry fg, bg */
175+
"black", "lightgray", /* compact button fg, bg */
176+
"lightgray", "red", /* active & sel listbox */
177+
"black", "brown" /* selected listbox */
178+
};
179+
153180
/*BOTH - Menu file related settings*/
154181
FILE * menu_file;
155182
#define MENU_HEADING_LENGTH 80
@@ -347,6 +374,11 @@ int main(int argc, char * argv[]) {
347374
newtInit();
348375
newtCls();
349376

377+
/* Using the colour pallette define earlier - set the colours and refresh*/
378+
newtSetColors(newtDefaultColorPalette);
379+
newtRefresh();
380+
381+
350382
/* Setup call backs */
351383
newtSetSuspendCallback(suspend, NULL);
352384
newtSetHelpCallback(helpCallback);

0 commit comments

Comments
 (0)