kconfig: menuconfig: Make hidden options show with different color
PATCH v2 1/1 kconfig: menuconfig: Make hidden options show with different color
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (COLOR_YELLOW for color themes and A_DIM for mono).
--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* Replaced A_DIM for color themes with COLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up with COLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.
scripts/kconfig/lxdialog/dialog.h +5 -0
@@ -100,6 +100,8 @@ struct dialog_info {struct dialog_color menubox_border;struct dialog_color item;struct dialog_color item_selected; +struct dialog_color item_hidden; +struct dialog_color item_hidden_selected;struct dialog_color tag;struct dialog_color tag_selected;struct dialog_color tag_key;
@@ -128,6 +130,7 @@ void item_add_str(const char *fmt, ...);void item_set_tag (char tag);void item_set_data (void *p);void item_set_selected (int val); +void item_set_hidden (int val);int item_activate_selected (void );void *item_data (void );char item_tag (void );
@@ -139,6 +142,7 @@ struct dialog_item {char tag;void *data;/* pointer to menu item - used by menubox+checklist */ int selected;/* Set to 1 by dialog_*() function if selected. */ +int hidden;/* Set to 1 if hidden. */ };/* list of lialog_items */
@@ -157,6 +161,7 @@ int item_n(void);const char *item_str (void );int item_is_selected (void );int item_is_tag (char tag); +int item_is_hidden (void );#define item_foreach () \ for (item_cur = item_head ? item_head: item_cur; \ item_cur && (item_cur != &item_nil); item_cur = item_cur->next)
scripts/kconfig/lxdialog/menubox.c +8 -4
@@ -51,9 +51,9 @@ static int menu_width, item_x;* Print menu item */ static void do_print_item (WINDOW * win,const char *item,int line_y, -int selected,int hotkey) +int selected,int hotkey,int hidden) { -int j; +int j, attrs;char *menu_item =malloc (menu_width +1 );strncpy (menu_item, item, menu_width - item_x);
@@ -64,7 +64,11 @@ static void do_print_item(WINDOW * win, const char *item, int line_y,wattrset (win, dlg.menubox.atr);wmove (win, line_y,0 );wclrtoeol (win); -wattrset (win, selected ? dlg.item_selected.atr : dlg.item.atr); +if (hidden) + attrs = selected ? dlg.item_hidden_selected.atr : dlg.item_hidden.atr; +else + attrs = selected ? dlg.item_selected.atr : dlg.item.atr; +wattrset (win, attrs);mvwaddstr (win, line_y, item_x, menu_item);if (hotkey) { wattrset(win, selected ? dlg.tag_key_selected.atr
@@ -81,7 +85,7 @@ static void do_print_item(WINDOW * win, const char *item, int line_y,#define print_item (index, choice, selected) \ do { \ item_set(index); \ - do_print_item(menu, item_str(), choice, selected, !item_is_tag(':')); \ + do_print_item(menu, item_str(), choice, selected, !item_is_tag(':'), item_is_hidden()); \ } while (0)/*
scripts/kconfig/lxdialog/util.c +19 -0
@@ -38,6 +38,8 @@ static void set_mono_theme(void) dlg.menubox_border.atr =A_NORMAL ; dlg.item.atr =A_NORMAL ; dlg.item_selected.atr =A_REVERSE ; + dlg.item_hidden.atr =A_NORMAL |A_DIM ; + dlg.item_hidden_selected.atr =A_REVERSE |A_DIM ; dlg.tag.atr =A_BOLD ; dlg.tag_selected.atr =A_REVERSE ; dlg.tag_key.atr =A_BOLD ;
@@ -78,6 +80,8 @@ static void set_classic_theme(void)DLG_COLOR (menubox_border,COLOR_WHITE ,COLOR_WHITE , true);DLG_COLOR (item,COLOR_BLACK ,COLOR_WHITE , false);DLG_COLOR (item_selected,COLOR_WHITE ,COLOR_BLUE , true); +DLG_COLOR (item_hidden,COLOR_YELLOW ,COLOR_WHITE , false); +DLG_COLOR (item_hidden_selected,COLOR_WHITE ,COLOR_BLUE , true);DLG_COLOR (tag,COLOR_YELLOW ,COLOR_WHITE , true);DLG_COLOR (tag_selected,COLOR_YELLOW ,COLOR_BLUE , true);DLG_COLOR (tag_key,COLOR_YELLOW ,COLOR_WHITE , true);
@@ -118,6 +122,9 @@ static void set_blackbg_theme(void)DLG_COLOR (item,COLOR_WHITE ,COLOR_BLACK , false);DLG_COLOR (item_selected,COLOR_WHITE ,COLOR_RED , false); +DLG_COLOR (item_hidden,COLOR_YELLOW ,COLOR_BLACK , false); +DLG_COLOR (item_hidden_selected,COLOR_YELLOW ,COLOR_RED , false); +DLG_COLOR (tag,COLOR_RED ,COLOR_BLACK , false);DLG_COLOR (tag_selected,COLOR_YELLOW ,COLOR_RED , true);DLG_COLOR (tag_key,COLOR_RED ,COLOR_BLACK , false);
@@ -198,6 +205,8 @@ static void init_dialog_colors(void)init_one_color (&dlg.menubox_border);init_one_color (&dlg.item);init_one_color (&dlg.item_selected); +init_one_color (&dlg.item_hidden); +init_one_color (&dlg.item_hidden_selected);init_one_color (&dlg.tag);init_one_color (&dlg.tag_selected);init_one_color (&dlg.tag_key);
@@ -635,6 +644,11 @@ void item_set_selected(int val) item_cur->node.selected = val; } +void item_set_hidden (int val) +{ + item_cur->node.hidden = val; +} +int item_activate_selected (void ) {item_foreach ()
@@ -698,3 +712,8 @@ int item_is_tag(char tag) {return (item_cur->node.tag == tag); } + +int item_is_hidden (void ) +{ +return (item_cur->node.hidden !=0 ); +}
scripts/kconfig/mconf.c +18 -0
@@ -488,6 +488,8 @@ static void build_conf(struct menu *menu) menu_is_empty(menu) ? "----" : "--->");item_set_tag ('m' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE);if (single_menu_mode && menu->data) goto conf_childs;return ;
@@ -497,6 +499,8 @@ static void build_conf(struct menu *menu)item_make (" %*c*** %s ***" , indent +1 ,' ' , prompt);item_set_tag (':' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE); }break ;default :
@@ -505,6 +509,8 @@ static void build_conf(struct menu *menu)item_make ("---%*c%s" , indent +1 ,' ' , prompt);item_set_tag (':' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE); } } }else
@@ -540,10 +546,14 @@ static void build_conf(struct menu *menu) }item_set_tag ('t' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE); }else {item_make (" " );item_set_tag (def_menu ?'t' :':' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE); }item_add_str ("%*c%s" , indent +1 ,' ' ,menu_get_prompt (menu));
@@ -564,6 +574,8 @@ static void build_conf(struct menu *menu)item_make ("---%*c%s" , indent +1 ,' ' ,menu_get_prompt (menu));item_set_tag (':' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE); goto conf_childs; } child_count++;
@@ -581,6 +593,8 @@ static void build_conf(struct menu *menu)item_make ("-%c-" , val == no ?' ' :'*' );item_set_tag ('t' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE);break ;case S_TRISTATE :switch (val) {
@@ -597,6 +611,8 @@ static void build_conf(struct menu *menu)item_make ("-%c-" , ch);item_set_tag ('t' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE);break ;default : tmp =2 +strlen (sym_get_string_value (sym));/* () = 2 */
@@ -609,6 +625,8 @@ static void build_conf(struct menu *menu) "" : " (NEW)");item_set_tag ('s' );item_set_data (menu); +if (!visible) +item_set_hidden (TRUE); goto conf_childs; } }
Signature · 1 line
2.39.2
Quoted 14 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)
Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.
Thanks, output looks good to me on my console as well as on all my terminal emulators and in all themes.
Quoted 14 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)
Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.
Thanks! Run a quick tests in xterm. Looks neat!
Is there a reason to set hidden flag in all of the _if_ and _switch_ statements in the build_conf() function? Could similar be done in a more generic way? For example:
visible = menu_is_visible(menu); if (!visible) item_set_hidden(TRUE);
Or this approach will bring some negative side effects ?
Quoted 31 lines · Matthew Bystrin
Quoted 14 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.Thanks! Run a quick tests in xterm. Looks neat!
Is there a reason to set hidden flag in all of the _if_ and _switch_ statements in the
build_conf()function? Could similar be done in a more generic way? For example:
Quoted 6 lines
visible = menu_is_visible(menu); if (!visible) item_set_hidden(TRUE);Or this approach will bring some negative side effects ?
I guess he just inserted item_set_hidden() where he saw item_make().
Since build_conf() resources to itself, the code flow is difficult to track.
You can safely factor it out in some places (for example, just blow), but that does not make a big difference.
scripts/kconfig/mconf.c +3 -4
@@ -546,16 +546,15 @@ static void build_conf(struct menu *menu) }item_set_tag ('t' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE); }else {item_make (" " );item_set_tag (def_menu ?'t' :':' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE); } +if (!visible) +item_set_hidden (TRUE); +item_add_str ("%*c%s" , indent +1 ,' ' ,menu_get_prompt (menu));if (val == yes) {if (def_menu) {
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 59 lines · Masahiro Yamada
Quoted 31 lines · Matthew Bystrin
Quoted 14 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.Thanks! Run a quick tests in xterm. Looks neat!
Is there a reason to set hidden flag in all of the _if_ and _switch_ statements in the
build_conf()function? Could similar be done in a more generic way? For example:Quoted 6 lines
visible = menu_is_visible(menu); if (!visible) item_set_hidden(TRUE);Or this approach will bring some negative side effects ?
I guess he just inserted
item_set_hidden()where he sawitem_make().Since
build_conf()resources to itself, the code flow is difficult to track.You can safely factor it out in some places (for example, just blow), but that does not make a big difference.
scripts/kconfig/mconf.c +0
-0@@ -546,16 +546,15 @@ static void build_conf(struct menu *menu) }
scripts/kconfig/mconf.c static void build_conf(struct menu *menu) · line 556
Quoted 10 lines
scripts/kconfig/mconf.c +0
-4item_set_tag ('t' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE); }else {item_make (" " );item_set_tag (def_menu ?'t' :':' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE);
I wanted to be consistent with the current code, which already has the same item_set_data(menu) in both branches. I'm okay with either. Do you want me to resend with this change?
Best regards,
Tomasz
Quoted 19 lines
scripts/kconfig/mconf.c +3
-1} +if (!visible) +item_set_hidden (TRUE); +item_add_str ("%*c%s" , indent +1 ,' ' ,menu_get_prompt (menu));if (val == yes) {if (def_menu) { --Best Regards
Masahiro Yamada
Quoted 67 lines · Tomasz Figa
Quoted 65 lines · Masahiro Yamada
Quoted 31 lines · Matthew Bystrin
Quoted 14 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.Thanks! Run a quick tests in xterm. Looks neat!
Is there a reason to set hidden flag in all of the _if_ and _switch_ statements in the
build_conf()function? Could similar be done in a more generic way? For example:Quoted 6 lines
visible = menu_is_visible(menu); if (!visible) item_set_hidden(TRUE);Or this approach will bring some negative side effects ?
I guess he just inserted
item_set_hidden()where he sawitem_make().Since
build_conf()resources to itself, the code flow is difficult to track.You can safely factor it out in some places (for example, just blow), but that does not make a big difference.
scripts/kconfig/mconf.c +0
-2@@ -546,16 +546,15 @@ static void build_conf(struct menu *menu) }item_set_tag ('t' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE); }else {item_make (" " );
Quoted 8 lines
scripts/kconfig/mconf.c static void build_conf(struct menu *menu) · line 556
Quoted 4 lines
scripts/kconfig/mconf.c +0
-2item_set_tag (def_menu ?'t' :':' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE);I wanted to be consistent with the current code, which already has the same
item_set_data(menu)in both branches. I'm okay with either. Do you want me to resend with this change?
I am fine with either way.
I thought build_conf() was messy,
but it is not a problem with your patch.
Talking about the code consistency, what about this suggestion?
In line 26, A_DIM is directly assigned.
dlg.button_inactive.atr = A_DIM;
If you verbosely add 'A_NORMAL |',
the other line should look like this:
dlg.item_hidden_selected.atr = A_NORMAL | A_REVERSE | A_DIM;
And, we need to insert 'A_NORMAL |'
to every assignment.
If you agree with me, you can offer to modify the patch locally.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 104 lines · Masahiro Yamada
Quoted 67 lines · Tomasz Figa
Quoted 65 lines · Masahiro Yamada
Quoted 31 lines · Matthew Bystrin
Quoted 14 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.Thanks! Run a quick tests in xterm. Looks neat!
Is there a reason to set hidden flag in all of the _if_ and _switch_ statements in the
build_conf()function? Could similar be done in a more generic way? For example:Quoted 6 lines
visible = menu_is_visible(menu); if (!visible) item_set_hidden(TRUE);Or this approach will bring some negative side effects ?
I guess he just inserted
item_set_hidden()where he sawitem_make().Since
build_conf()resources to itself, the code flow is difficult to track.You can safely factor it out in some places (for example, just blow), but that does not make a big difference.
scripts/kconfig/mconf.c +0
-2@@ -546,16 +546,15 @@ static void build_conf(struct menu *menu) }item_set_tag ('t' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE); }else {item_make (" " );Quoted 8 lines
scripts/kconfig/mconf.c static void build_conf(struct menu *menu) · line 556
Quoted 4 lines
scripts/kconfig/mconf.c +0
-2item_set_tag (def_menu ?'t' :':' );item_set_data (menu); -if (!visible) -item_set_hidden (TRUE);I wanted to be consistent with the current code, which already has the same
item_set_data(menu)in both branches. I'm okay with either. Do you want me to resend with this change?I am fine with either way.
I thoughtbuild_conf()was messy,
but it is not a problem with your patch.Talking about the code consistency, what about this suggestion?
In line 26,
A_DIMis directly assigned.dlg.button_inactive.atr = A_DIM;If you verbosely add '
A_NORMAL|',
the other line should look like this:dlg.item_hidden_selected.atr = A_NORMAL | A_REVERSE | A_DIM;
Quoted 7 lines
And, we need to insert '
A_NORMAL|'
to every assignment.If you agree with me, you can offer to modify the patch locally.
Ah, sorry, missed that email. I think we can just remove A_NORMAL if we have the other bits, as you suggested in your first reply. Let me fix that.
Best regards,
Tomasz
Quoted 16 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>---
scripts/kconfig/lxdialog/util.c +0
-0
scripts/kconfig/lxdialog/util.c static void set_mono_theme(void) · line 41
Quoted 4 lines
scripts/kconfig/lxdialog/util.c +1
-0@@ -38,6 +38,8 @@ static void set_mono_theme(void) dlg.menubox_border.atr =A_NORMAL ; dlg.item.atr =A_NORMAL ; dlg.item_selected.atr =A_REVERSE ; + dlg.item_hidden.atr =A_NORMAL |A_DIM ;
Nit.
(A_NORMAL | A_DIM) should be A_DIM.
A_NORMAL is zero.
Other A_* attributes are bit flags that can be OR'ed.
--
Best Regards
Masahiro Yamada
Hi,
Quoted 16 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)
Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.
I guess COLOR_YELLOW is a relative thing, i.e., it depends on the term's current color scheme in my testing.
With rxvt (with a beige/khaki background), I do see yellow.
With xfce4-terminal (with amber/orange foreground on black background, i.e., my default from days of amber monochrome displays ;), the "yellow" comes out as a faded/washed out/dim orange. But still readable.
Anyway, this looks useful to me.
thanks.
Signature · 1 line
#Randy
Quoted 29 lines · Randy Dunlap
Hi,
Quoted 16 lines · Tomasz Figa
When hidden options are toggled on (using 'z'), the number of options on the screen can be overwhelming and may make it hard to distinguish between available and hidden ones. Make them easier to distinguish by displaying the hidden one with a different color (
COLOR_YELLOWfor color themes andA_DIMfor mono).Signed-off-by Tomasz Figa <[email protected]>--- scripts/kconfig/lxdialog/dialog.h | 5 +++++ scripts/kconfig/lxdialog/menubox.c | 12 ++++++++---- scripts/kconfig/lxdialog/util.c | 19 +++++++++++++++++++ scripts/kconfig/mconf.c | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-)Quoted 8 lines
Changes from v1:
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
* ReplacedA_DIMfor color themes withCOLOR_YELLOW, because the former has no effect to black text on some commonly used terminals, e.g. gnome-terminal, foot. Reported by Masahiro Yamada and Nicolas Schier. I ended up withCOLOR_YELLOW, as it seems to look comparatively dim with mutliple light and dark color themes in Chromium hterm and gnome-terminal.
Quoted 2 lines
I guess
COLOR_YELLOWis a relative thing, i.e., it depends on the term's current color scheme in my testing.
Yeah, it's kind of on the edge of being relatively neutral, i.e. not standing out much more than the visible options, but I couldn't really find anything that would work better for the standard 16-color mode. An alternative would be to implement support for the 256-color mode, but that would likely require quite a lot of changes in the existing code (and I'm not very familiar with how to do it in ncurses...).
Quoted 11 lines
With rxvt (with a beige/khaki background), I do see yellow.
With xfce4-terminal (with amber/orange foreground on black background, i.e., my default from days of amber monochrome displays ;), the "yellow" comes out as a faded/washed out/dim orange. But still readable.
Anyway, this looks useful to me.
Acked-by Randy Dunlap <[email protected]>Tested-by Randy Dunlap <[email protected]>
Thanks a lot!
Best regards,
Tomasz