kconfig/lxdialog: color theme support
cover kconfig/lxdialog: color theme support
Following three patches introduce support for color themes in menuconfig.
First patch is a refactoring of the color support in lxdialog, and the next two introduces two new color schemes: blackbg and bluetitle.
The latter should be well know to -mm users.
To use a color theme:
make MENUCONFIG_COLOR=blackbg menuconfig
Avalable themes:
blackbg, mono, bluetitle
Sam
PATCH 1/3 kconfig/lxdialog: refactored color settings
Quoted 1 line
From
be7fbedf9f3d8af80a5cbcbb7d83970f32a9a509Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Mon, 24 Jul 2006 09:52:50 +0200
Subject: [PATCH] kconfig/lxdialog: refactored color settings
Use a variable to define the color for various dialog items. As an added benefit the definitions are now combined in fewer places.
--- scripts/kconfig/lxdialog/checklist.c | 28 +++-- scripts/kconfig/lxdialog/colors.h | 154 ---------------------------- scripts/kconfig/lxdialog/dialog.h | 78 ++++++++------ scripts/kconfig/lxdialog/inputbox.c | 18 ++- scripts/kconfig/lxdialog/lxdialog.c | 2 scripts/kconfig/lxdialog/menubox.c | 28 +++-- scripts/kconfig/lxdialog/msgbox.c | 9 +- scripts/kconfig/lxdialog/textbox.c | 19 ++-- scripts/kconfig/lxdialog/util.c | 184 +++++++++++++++++----------------- scripts/kconfig/lxdialog/yesno.c | 9 +- 10 files changed, 195 insertions(+), 334 deletions(-)
scripts/kconfig/lxdialog/checklist.c +15 -13
@@ -34,18 +34,19 @@ static void print_item(WINDOW * win, conint i;/* Clear 'residue' of last item */ -wattrset (win, menubox_attr); +wattrset (win, dlg_clr.menubox.atr);wmove (win, choice,0 );for (i =0 ; i < list_width; i++)waddch (win,' ' );wmove (win, choice, check_x); -wattrset (win, selected ? check_selected_attr : check_attr); +wattrset (win, selected ? dlg_clr.check_selected.atr + : dlg_clr.check.atr);wprintw (win,"(%c)" , status ?'X' :' ' ); -wattrset (win, selected ? tag_selected_attr : tag_attr); +wattrset (win, selected ? dlg_clr.tag_selected.atr : dlg_clr.tag.atr);mvwaddch (win, choice, item_x, item[0 ]); -wattrset (win, selected ? item_selected_attr : item_attr); +wattrset (win, selected ? dlg_clr.item_selected.atr : dlg_clr.item.atr);waddstr (win, (char *)item +1 );if (selected) {wmove (win, choice, check_x +1 );
@@ -62,11 +63,11 @@ static void print_arrows(WINDOW * win, iwmove (win, y, x);if (scroll >0 ) { -wattrset (win, uarrow_attr); +wattrset (win, dlg_clr.uarrow.atr);waddch (win,ACS_UARROW );waddstr (win,"(-)" ); }else { -wattrset (win, menubox_attr); +wattrset (win, dlg_clr.menubox.atr);waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );
@@ -77,11 +78,11 @@ static void print_arrows(WINDOW * win, iwmove (win, y, x);if ((height < item_no) && (scroll + choice < item_no -1 )) { -wattrset (win, darrow_attr); +wattrset (win, dlg_clr.darrow.atr);waddch (win,ACS_DARROW );waddstr (win,"(+)" ); }else { -wattrset (win, menubox_border_attr); +wattrset (win, dlg_clr.menubox_border.atr);waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );
@@ -145,17 +146,18 @@ int dialog_checklist(const char *title, dialog =newwin (height, width, y, x);keypad (dialog, TRUE); -draw_box (dialog,0 ,0 , height, width, dialog_attr, border_attr); -wattrset (dialog, border_attr); +draw_box (dialog,0 ,0 , height, width, + dlg_clr.dialog.atr, dlg_clr.border.atr); +wattrset (dialog, dlg_clr.border.atr);mvwaddch (dialog, height -3 ,0 ,ACS_LTEE );for (i =0 ; i < width -2 ; i++)waddch (dialog,ACS_HLINE ); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);waddch (dialog,ACS_RTEE );print_title (dialog, title, width); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);print_autowrap (dialog, prompt, width -2 ,1 ,3 ); list_width = width -6 ;
@@ -170,7 +172,7 @@ int dialog_checklist(const char *title,/* draw a box around the list items */ draw_box (dialog, box_y, box_x, list_height +2 , list_width +2 , - menubox_border_attr, menubox_attr); + dlg_clr.menubox_border.atr, dlg_clr.menubox.atr);/* Find length of longest item in order to center checklist */ check_x =0 ;
scripts/kconfig/lxdialog/colors.h deleted +0 -154
154 lines not on this page · raw message
scripts/kconfig/lxdialog/dialog.h +43 -35
91 lines not on this page · raw message
scripts/kconfig/lxdialog/inputbox.c +10 -8
@@ -58,17 +58,18 @@ int dialog_inputbox(const char *title, c dialog =newwin (height, width, y, x);keypad (dialog, TRUE); -draw_box (dialog,0 ,0 , height, width, dialog_attr, border_attr); -wattrset (dialog, border_attr); +draw_box (dialog,0 ,0 , height, width, + dlg_clr.dialog.atr, dlg_clr.border.atr); +wattrset (dialog, dlg_clr.border.atr);mvwaddch (dialog, height -3 ,0 ,ACS_LTEE );for (i =0 ; i < width -2 ; i++)waddch (dialog,ACS_HLINE ); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);waddch (dialog,ACS_RTEE );print_title (dialog, title, width); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);print_autowrap (dialog, prompt, width -2 ,1 ,3 );/* Draw the input field box */
@@ -76,13 +77,14 @@ int dialog_inputbox(const char *title, cgetyx (dialog, y, x); box_y = y +2 ; box_x = (width - box_width) /2 ; -draw_box (dialog, y +1 , box_x -1 ,3 , box_width +2 , border_attr, dialog_attr); +draw_box (dialog, y +1 , box_x -1 ,3 , box_width +2 , + dlg_clr.border.atr, dlg_clr.dialog.atr);print_buttons (dialog, height, width,0 );/* Set up the initial value */ wmove (dialog, box_y, box_x); -wattrset (dialog, inputbox_attr); +wattrset (dialog, dlg_clr.inputbox.atr);if (!init) instr[0 ] ='\0' ;
@@ -120,7 +122,7 @@ int dialog_inputbox(const char *title, ccase KEY_BACKSPACE :case 127 :if (input_x || scroll) { -wattrset (dialog, inputbox_attr); +wattrset (dialog, dlg_clr.inputbox.atr);if (!input_x) { scroll = scroll < box_width -1 ?0 : scroll - (box_width -1 );wmove (dialog, box_y, box_x);
@@ -140,7 +142,7 @@ int dialog_inputbox(const char *title, cdefault :if (key <0x100 &&isprint (key)) {if (scroll + input_x <MAX_LEN ) { -wattrset (dialog, inputbox_attr); +wattrset (dialog, dlg_clr.inputbox.atr); instr[scroll + input_x] = key; instr[scroll + input_x +1 ] ='\0' ;if (input_x == box_width -1 ) {
scripts/kconfig/lxdialog/lxdialog.c +1 -1
@@ -123,7 +123,7 @@ #endif retval = (*(modePtr->jumper)) (title, argc - offset, argv + offset);if (opt_clear) {/* clear screen before exit */ -attr_clear (stdscr,LINES ,COLS , screen_attr); +attr_clear (stdscr,LINES ,COLS , dlg_clr.screen.atr);refresh (); }end_dialog ();
scripts/kconfig/lxdialog/menubox.c +15 -13
@@ -74,7 +74,7 @@ static void do_print_item(WINDOW * win, j =first_alpha (menu_item,"YyNnMmHh" );/* Clear 'residue' of last item */ -wattrset (win, menubox_attr); +wattrset (win, dlg_clr.menubox.atr);wmove (win, choice,0 );#if OLD_NCURSES {
@@ -85,10 +85,11 @@ #if OLD_NCURSES#else wclrtoeol (win);#endif -wattrset (win, selected ? item_selected_attr : item_attr); +wattrset (win, selected ? dlg_clr.item_selected.atr : dlg_clr.item.atr);mvwaddstr (win, choice, item_x, menu_item);if (hotkey) { -wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); +wattrset (win, selected ? dlg_clr.tag_key_selected.atr + : dlg_clr.tag_key.atr);mvwaddch (win, choice, item_x + j, menu_item[j]); }if (selected) {
@@ -117,11 +118,11 @@ static void print_arrows(WINDOW * win, iwmove (win, y, x);if (scroll >0 ) { -wattrset (win, uarrow_attr); +wattrset (win, dlg_clr.uarrow.atr);waddch (win,ACS_UARROW );waddstr (win,"(-)" ); }else { -wattrset (win, menubox_attr); +wattrset (win, dlg_clr.menubox.atr);waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );
@@ -133,11 +134,11 @@ static void print_arrows(WINDOW * win, iwrefresh (win);if ((height < item_no) && (scroll + height < item_no)) { -wattrset (win, darrow_attr); +wattrset (win, dlg_clr.darrow.atr);waddch (win,ACS_DARROW );waddstr (win,"(+)" ); }else { -wattrset (win, menubox_border_attr); +wattrset (win, dlg_clr.menubox_border.atr);waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );waddch (win,ACS_HLINE );
@@ -199,18 +200,19 @@ int dialog_menu(const char *title, const dialog =newwin (height, width, y, x);keypad (dialog, TRUE); -draw_box (dialog,0 ,0 , height, width, dialog_attr, border_attr); -wattrset (dialog, border_attr); +draw_box (dialog,0 ,0 , height, width, + dlg_clr.dialog.atr, dlg_clr.border.atr); +wattrset (dialog, dlg_clr.border.atr);mvwaddch (dialog, height -3 ,0 ,ACS_LTEE );for (i =0 ; i < width -2 ; i++)waddch (dialog,ACS_HLINE ); -wattrset (dialog, dialog_attr); -wbkgdset (dialog, dialog_attr &A_COLOR ); +wattrset (dialog, dlg_clr.dialog.atr); +wbkgdset (dialog, dlg_clr.dialog.atr &A_COLOR );waddch (dialog,ACS_RTEE );print_title (dialog, title, width); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);print_autowrap (dialog, prompt, width -2 ,1 ,3 ); menu_width = width -6 ;
@@ -224,7 +226,7 @@ int dialog_menu(const char *title, const/* draw a box around the menu items */ draw_box (dialog, box_y, box_x, menu_height +2 , menu_width +2 , - menubox_border_attr, menubox_attr); + dlg_clr.menubox_border.atr, dlg_clr.menubox.atr); item_x = (menu_width -70 ) /2 ;
scripts/kconfig/lxdialog/msgbox.c +5 -4
@@ -40,19 +40,20 @@ int dialog_msgbox(const char *title, con dialog =newwin (height, width, y, x);keypad (dialog, TRUE); -draw_box (dialog,0 ,0 , height, width, dialog_attr, border_attr); +draw_box (dialog,0 ,0 , height, width, + dlg_clr.dialog.atr, dlg_clr.border.atr);print_title (dialog, title, width); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);print_autowrap (dialog, prompt, width -2 ,1 ,2 );if (pause) { -wattrset (dialog, border_attr); +wattrset (dialog, dlg_clr.border.atr);mvwaddch (dialog, height -3 ,0 ,ACS_LTEE );for (i =0 ; i < width -2 ; i++)waddch (dialog,ACS_HLINE ); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);waddch (dialog,ACS_RTEE );print_button (dialog," Ok " , height -2 , width /2 -4 , TRUE);
scripts/kconfig/lxdialog/textbox.c +10 -9
@@ -87,20 +87,21 @@ int dialog_textbox(const char *title, co/* Create window for text region, used for scrolling text */ text =subwin (dialog, height -4 , width -2 , y +1 , x +1 ); -wattrset (text, dialog_attr); -wbkgdset (text, dialog_attr &A_COLOR ); +wattrset (text, dlg_clr.dialog.atr); +wbkgdset (text, dlg_clr.dialog.atr &A_COLOR );keypad (text, TRUE);/* register the new window, along with its borders */ -draw_box (dialog,0 ,0 , height, width, dialog_attr, border_attr); +draw_box (dialog,0 ,0 , height, width, + dlg_clr.dialog.atr, dlg_clr.border.atr); -wattrset (dialog, border_attr); +wattrset (dialog, dlg_clr.border.atr);mvwaddch (dialog, height -3 ,0 ,ACS_LTEE );for (i =0 ; i < width -2 ; i++)waddch (dialog,ACS_HLINE ); -wattrset (dialog, dialog_attr); -wbkgdset (dialog, dialog_attr &A_COLOR ); +wattrset (dialog, dlg_clr.dialog.atr); +wbkgdset (dialog, dlg_clr.dialog.atr &A_COLOR );waddch (dialog,ACS_RTEE );print_title (dialog, title, width);
@@ -110,7 +111,7 @@ int dialog_textbox(const char *title, cogetyx (dialog, cur_y, cur_x);/* Save cursor position */ /* Print first page of text */ -attr_clear (text, height -4 , width -2 , dialog_attr); +attr_clear (text, height -4 , width -2 , dlg_clr.dialog.atr);print_page (text, height -4 , width -2 );print_position (dialog, height, width);wmove (dialog, cur_y, cur_x);/* Restore cursor position */
@@ -524,8 +525,8 @@ static void print_position(WINDOW * win,fprintf (stderr,"\nError moving file pointer in print_position().\n" );exit (-1 ); } -wattrset (win, position_indicator_attr); -wbkgdset (win, position_indicator_attr &A_COLOR ); +wattrset (win, dlg_clr.position_indicator.atr); +wbkgdset (win, dlg_clr.position_indicator.atr &A_COLOR ); percent = !file_size ?100 : ((fpos - bytes_read + page - buf) *100 ) / file_size;wmove (win, height -3 , width -9 );
scripts/kconfig/lxdialog/util.c +91 -93
236 lines not on this page · raw message
scripts/kconfig/lxdialog/yesno.c +5 -4
@@ -53,17 +53,18 @@ int dialog_yesno(const char *title, cons dialog =newwin (height, width, y, x);keypad (dialog, TRUE); -draw_box (dialog,0 ,0 , height, width, dialog_attr, border_attr); -wattrset (dialog, border_attr); +draw_box (dialog,0 ,0 , height, width, + dlg_clr.dialog.atr, dlg_clr.border.atr); +wattrset (dialog, dlg_clr.border.atr);mvwaddch (dialog, height -3 ,0 ,ACS_LTEE );for (i =0 ; i < width -2 ; i++)waddch (dialog,ACS_HLINE ); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);waddch (dialog,ACS_RTEE );print_title (dialog, title, width); -wattrset (dialog, dialog_attr); +wattrset (dialog, dlg_clr.dialog.atr);print_autowrap (dialog, prompt, width -2 ,1 ,3 );print_buttons (dialog, height, width,0 );
Signature · 1 line
1.4.1.rc2.gfc04
PATCH 2/3 kconfig/lxdialog: add support for color themes and add blackbg theme
In reply to Sam RavnborgQuoted 1 line
From
7ba8d280514c5caf48d36c0f02d9be139ec71e58Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Mon, 24 Jul 2006 12:55:29 +0200
Subject: [PATCH] kconfig/lxdialog: add support for color themes and add blackbg theme
The blackbg color scheme is made by: Han Boetes
To use the blackbg color theme use:
make MENUCONFIG_COLOR=blackbg menuconfig
--- scripts/kconfig/lxdialog/dialog.h | 2 - scripts/kconfig/lxdialog/util.c | 85 ++++++++++++++++++++++++++++++------- scripts/kconfig/mconf.c | 14 ++++++ 3 files changed, 82 insertions(+), 19 deletions(-)
scripts/kconfig/lxdialog/dialog.h +0 -2
@@ -135,7 +135,6 @@ extern struct dlg_clr dlg_clr;/* * Global variables */ -extern bool use_colors;extern bool use_shadow;extern const char *backtitle;
@@ -150,7 +149,6 @@ void init_dialog(void);void end_dialog (void );void attr_clear (WINDOW * win,int height,int width,chtype attr);void dialog_clear (void ); -void color_setup (void );void print_autowrap (WINDOW * win,const char *prompt,int width,int y,int x);void print_button (WINDOW * win,const char *label,int y,int x,int selected);void print_title (WINDOW *dialog,const char *title,int width);
scripts/kconfig/lxdialog/util.c +69 -16
114 lines not on this page · raw message
scripts/kconfig/mconf.c +13 -1
@@ -159,7 +159,19 @@ static const char mconf_readme[] = N_("\n" "Note that this mode can eventually be a little more CPU expensive\n" "(especially with a larger number of unrolled categories) than the\n" -"default mode.\n"), +"default mode.\n" +"\n" +"Different color themes available\n" +"--------------------------------\n" +"It is possible to select different color themes using the variable\n" +"MENUCONFIG_COLOR. To select a theme use:\n" +"\n" +"make MENUCONFIG_COLOR=<theme> menuconfig\n" +"\n" +"Available themes are\n" +" mono => selects colors suitable for monochrome displays\n" +" blackbg => selects a color scheme with black background\n" +"\n"), menu_instructions[] = N_("Arrow keys navigate the menu. " "<Enter> selects submenus --->. "
Signature · 1 line
1.4.1.rc2.gfc04
Re: [PATCH 2/3] kconfig/lxdialog: add support for color themes and add blackbg theme
Hi,
scripts/kconfig/lxdialog/util.c static void init_dialog_colors(void) · line 159
Quoted 9 lines · Sam Ravnborg
scripts/kconfig/lxdialog/util.c +9
-0+static int set_color_theme (const char *theme) +{ +int use_color =1 ; +if (!strncasecmp (theme,"blackbg" ,sizeof ("blackbg" ))) +set_blackbg_theme (); +else if (!strncasecmp (theme,"mono" ,sizeof ("mono" ))) + use_color =0 ; +return use_color; +}
This segfaults if MENUCONFIG_COLOR isn't set.
bye, Roman
Re: [PATCH 2/3] kconfig/lxdialog: add support for color themes and add blackbg theme
Quoted 4 lines · Roman Zippel
Hi,
On Mon, 24 Jul 2006, Sam Ravnborg wrote:
Quoted 11 lines
scripts/kconfig/lxdialog/util.c static void init_dialog_colors(void) · line 159
Quoted 9 lines
scripts/kconfig/lxdialog/util.c +9
-0+static int set_color_theme (const char *theme) +{ +int use_color =1 ; +if (!strncasecmp (theme,"blackbg" ,sizeof ("blackbg" ))) +set_blackbg_theme (); +else if (!strncasecmp (theme,"mono" ,sizeof ("mono" ))) + use_color =0 ; +return use_color; +}This segfaults if
MENUCONFIG_COLORisn't set.
Thanks - will fix. I expected str* to be NULL safe...
Sam
PATCH 3/3 kconfig/lxdialog: add bluetitle color scheme
In reply to Sam RavnborgQuoted 1 line
From
911310907eca1e8c1feea41d9e1e3860f4eb3815Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Mon, 24 Jul 2006 13:30:05 +0200
Subject: [PATCH] kconfig/lxdialog: add bluetitle color scheme
Originally from -mm but modofied to the new color scheme support
--- scripts/kconfig/lxdialog/util.c | 14 ++++++++++++++ scripts/kconfig/mconf.c | 1 + 2 files changed, 15 insertions(+), 0 deletions(-)
scripts/kconfig/lxdialog/util.c +14 -0
@@ -102,6 +102,18 @@ static void set_blackbg_theme(void)DLG_MODIFY (darrow,COLOR_RED ,COLOR_BLACK , false); } +static void set_bluetitle_theme (void ) +{ +DLG_MODIFY (title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (button_label_active,COLOR_BLUE ,COLOR_BLUE , true); +DLG_MODIFY (searchbox_title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (position_indicator,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag_selected,COLOR_BLUE ,COLOR_BLUE , true); +DLG_MODIFY (tag_key,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag_key_selected,COLOR_BLUE ,COLOR_BLUE , true); +} +static void init_one_color (struct dialog_color *color) {static int pair =0 ;
@@ -153,6 +165,8 @@ static int set_color_theme(const char *tint use_color =1 ;if (!strncasecmp (theme,"blackbg" ,sizeof ("blackbg" )))set_blackbg_theme (); +if (!strncasecmp (theme,"bluetitle" ,sizeof ("bluetitle" ))) +set_bluetitle_theme ();else if (!strncasecmp (theme,"mono" ,sizeof ("mono" ))) use_color =0 ;return use_color;
scripts/kconfig/mconf.c +1 -0
@@ -171,6 +171,7 @@ static const char mconf_readme[] = N_("Available themes are\n" " mono => selects colors suitable for monochrome displays\n" " blackbg => selects a color scheme with black background\n" +" bluetitle => replace yellow titles with blue in classic scheme\n" "\n"), menu_instructions[] = N_( "Arrow keys navigate the menu. "
Signature · 1 line
1.4.1.rc2.gfc04
Re: [PATCH 3/3] kconfig/lxdialog: add bluetitle color scheme
Hi,
scripts/kconfig/lxdialog/util.c static void set_blackbg_theme(void) · line 115
Quoted 11 lines · Sam Ravnborg
scripts/kconfig/lxdialog/util.c +11
-0+static void set_bluetitle_theme (void ) +{ +DLG_MODIFY (title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (button_label_active,COLOR_BLUE ,COLOR_BLUE , true); +DLG_MODIFY (searchbox_title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (position_indicator,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag_selected,COLOR_BLUE ,COLOR_BLUE , true); +DLG_MODIFY (tag_key,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag_key_selected,COLOR_BLUE ,COLOR_BLUE , true); +}
In general I would like to see this one become the default, as yellow on white is really terrible, but this one needs fixing too - blue on blue is not really readable either. :)
bye, Roman
Re: [PATCH 3/3] kconfig/lxdialog: add bluetitle color scheme
Quoted 4 lines · Roman Zippel
Hi,
On Mon, 24 Jul 2006, Sam Ravnborg wrote:
Quoted 15 lines
scripts/kconfig/lxdialog/util.c static void set_blackbg_theme(void) · line 115
Quoted 11 lines
scripts/kconfig/lxdialog/util.c +11
-0+static void set_bluetitle_theme (void ) +{ +DLG_MODIFY (title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (button_label_active,COLOR_BLUE ,COLOR_BLUE , true); +DLG_MODIFY (searchbox_title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (position_indicator,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag_selected,COLOR_BLUE ,COLOR_BLUE , true); +DLG_MODIFY (tag_key,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag_key_selected,COLOR_BLUE ,COLOR_BLUE , true); +}In general I would like to see this one become the default, as yellow on white is really terrible, but this one needs fixing too - blue on blue is not really readable either. :)
I blindly replaced yellow with blue.
New version looks like this:
static void set_bluetitle_theme(void)
{
DLG_MODIFY(title, COLOR_BLUE, COLOR_WHITE, true);
DLG_MODIFY(tag, COLOR_BLUE, COLOR_WHITE, true);
DLG_MODIFY(tag_key, COLOR_BLUE, COLOR_WHITE, true);
}The classic color scheme is quite readable on my display.
I can make bluetitle default but keep classic as an option. Will try this in next version of the patchset.
Sam
Re: [PATCH 3/3] kconfig/lxdialog: add bluetitle color scheme
Hi,
Quoted 8 lines · Sam Ravnborg
I blindly replaced yellow with blue.
New version looks like this:
static voidset_bluetitle_theme(void){ DLG_MODIFY(title, COLOR_BLUE, COLOR_WHITE, true); DLG_MODIFY(tag, COLOR_BLUE, COLOR_WHITE, true); DLG_MODIFY(tag_key, COLOR_BLUE, COLOR_WHITE, true); }
The theme below should be a bit better and more consistent, selected text is always white on blue with a yellow key character.
Quoted 1 line
The classic color scheme is quite readable on my display.
On mnay displays (especially lcd's) the difference between yellow and white is very small, so that the text almost disappears.
bye, Roman
--- scripts/kconfig/lxdialog/util.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
scripts/kconfig/lxdialog/util.c +7 -8
@@ -104,14 +104,13 @@ static void set_blackbg_theme(void)static void set_bluetitle_theme (void ) { -DLG_MODIFY (title,COLOR_BLUE ,COLOR_WHITE , true); -DLG_MODIFY (button_label_active,COLOR_BLUE ,COLOR_BLUE , true); -DLG_MODIFY (searchbox_title,COLOR_BLUE ,COLOR_WHITE , true); -DLG_MODIFY (position_indicator,COLOR_BLUE ,COLOR_WHITE , true); -DLG_MODIFY (tag,COLOR_BLUE ,COLOR_WHITE , true); -DLG_MODIFY (tag_selected,COLOR_BLUE ,COLOR_BLUE , true); -DLG_MODIFY (tag_key,COLOR_BLUE ,COLOR_WHITE , true); -DLG_MODIFY (tag_key_selected,COLOR_BLUE ,COLOR_BLUE , true); +DLG_MODIFY (title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (button_key_active,COLOR_YELLOW ,COLOR_BLUE , true); +DLG_MODIFY (button_label_active,COLOR_WHITE ,COLOR_BLUE , true); +DLG_MODIFY (searchbox_title,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (position_indicator,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag,COLOR_BLUE ,COLOR_WHITE , true); +DLG_MODIFY (tag_key,COLOR_BLUE ,COLOR_WHITE , true); }static void init_one_color (struct dialog_color *color)