Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
firmwarekit
colors.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File colors.patch of Package firmwarekit
--- colors.h | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ui.c | 2 + 2 files changed, 87 insertions(+) --- /dev/null +++ b/colors.h @@ -0,0 +1,85 @@ +#include <newt.h> + +/* available colors (from slang src/slvideo.c) + "black", "blue", "green", "cyan", + "red", "magenta", "brown", "lightgray", + "gray", "brightblue", "brightgreen", "brightcyan", + "brightred", "brightmagenta", "yellow", "white" +*/ + +const struct newtColors newtDefaultColorPalette = { +// "red", "black", /* root fg, bg */ + "white", "green", /* root fg, bg */ + "black", "lightgray", /* border fg, bg */ +// "black", "green", /* window fg, bg */ + "black", "lightgray", /* window fg, bg */ + "white", "black", /* shadow fg, bg */ + "black", "lightgray", /* title fg, bg */ +// "red", "lightgray", /* title fg, bg */ + "lightgray", "red", /* button fg, bg */ + "red", "lightgray", /* active button fg, bg */ +// "yellow", "blue", /* checkbox fg, bg */ + "yellow", "green", /* checkbox fg, bg */ + "blue", "brown", /* active checkbox fg, bg */ +// "yellow", "blue", /* entry box fg, bg */ + "yellow", "green", /* entry box fg, bg */ + "blue", "lightgray", /* label fg, bg */ + "black", "lightgray", /* listbox fg, bg */ + "yellow", "green", /* active listbox fg, bg */ +// "yellow", "blue", /* active listbox fg, bg */ + "black", "lightgray", /* textbox fg, bg */ + "lightgray", "black", /* active textbox fg, bg */ +// "white", "blue", /* help line */ + "white", "green", /* help line */ +// "yellow", "blue", /* root text */ + "black", "green", /* root text */ + "green", /* scale full */ +// "blue", /* scale full */ + "red", /* scale empty */ + "blue", "lightgray", /* disabled entry fg, bg */ + "white", "green", /* compact button fg, bg */ +// "white", "blue", /* compact button fg, bg */ + "yellow", "red", /* active & sel listbox */ + "black", "brown" /* selected listbox */ +}; + +void newtSetColors(struct newtColors colors) { + SLtt_set_color(NEWT_COLORSET_ROOT, "", colors.rootFg, colors.rootBg); + SLtt_set_color(NEWT_COLORSET_BORDER, "", colors.borderFg, colors.borderBg); + SLtt_set_color(NEWT_COLORSET_WINDOW, "", colors.windowFg, colors.windowBg); + SLtt_set_color(NEWT_COLORSET_SHADOW, "", colors.shadowFg, colors.shadowBg); + SLtt_set_color(NEWT_COLORSET_TITLE, "", colors.titleFg, colors.titleBg); + SLtt_set_color(NEWT_COLORSET_BUTTON, "", colors.buttonFg, colors.buttonBg); + SLtt_set_color(NEWT_COLORSET_ACTBUTTON, "", colors.actButtonFg, + colors.actButtonBg); + SLtt_set_color(NEWT_COLORSET_CHECKBOX, "", colors.checkboxFg, + colors.checkboxBg); + SLtt_set_color(NEWT_COLORSET_ACTCHECKBOX, "", colors.actCheckboxFg, + colors.actCheckboxBg); + SLtt_set_color(NEWT_COLORSET_ENTRY, "", colors.entryFg, colors.entryBg); + SLtt_set_color(NEWT_COLORSET_LABEL, "", colors.labelFg, colors.labelBg); + SLtt_set_color(NEWT_COLORSET_LISTBOX, "", colors.listboxFg, + colors.listboxBg); + SLtt_set_color(NEWT_COLORSET_ACTLISTBOX, "", colors.actListboxFg, + colors.actListboxBg); + SLtt_set_color(NEWT_COLORSET_TEXTBOX, "", colors.textboxFg, + colors.textboxBg); + SLtt_set_color(NEWT_COLORSET_ACTTEXTBOX, "", colors.actTextboxFg, + colors.actTextboxBg); + SLtt_set_color(NEWT_COLORSET_HELPLINE, "", colors.helpLineFg, + colors.helpLineBg); + SLtt_set_color(NEWT_COLORSET_ROOTTEXT, "", colors.rootTextFg, + colors.rootTextBg); + SLtt_set_color(NEWT_COLORSET_EMPTYSCALE, "", "black", + colors.emptyScale); + SLtt_set_color(NEWT_COLORSET_FULLSCALE, "", "black", + colors.fullScale); + SLtt_set_color(NEWT_COLORSET_DISENTRY, "", colors.disabledEntryFg, + colors.disabledEntryBg); + SLtt_set_color(NEWT_COLORSET_COMPACTBUTTON, "", colors.compactButtonFg, + colors.compactButtonBg); + SLtt_set_color(NEWT_COLORSET_ACTSELLISTBOX, "", colors.actSelListboxFg, + colors.actSelListboxBg); + SLtt_set_color(NEWT_COLORSET_SELLISTBOX, "", colors.selListboxFg, + colors.selListboxBg); +} --- a/ui.c +++ b/ui.c @@ -29,6 +29,7 @@ #include <newt.h> #include "biostest.h" +#include "colors.h" static int myProgressWin=-1; @@ -71,6 +72,7 @@ void init_results_ui(void) sprintf(TitleText, " Linux-ready Firmware Developer Kit - Release %s - (C) 2007 Intel Corporation", get_lfdk_ver()); newtComponent myHelloText, myHelloForm; + newtSetColors(newtDefaultColorPalette); newtInit(); newtCls(); newtDrawRootText(0,0,TitleText);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor