diff --git a/lib/skin.h b/lib/skin.h index 59187cb9b..7d1c561f9 100644 --- a/lib/skin.h +++ b/lib/skin.h @@ -36,41 +36,42 @@ #define MENU_SELECTED_COLOR mc_skin_color__cache[14] #define MENU_HOT_COLOR mc_skin_color__cache[15] #define MENU_HOTSEL_COLOR mc_skin_color__cache[16] +#define MENU_INACTIVE_COLOR mc_skin_color__cache[17] /* * This should be selectable independently. Default has to be black background * foreground does not matter at all. */ -#define GAUGE_COLOR mc_skin_color__cache[17] -#define INPUT_COLOR mc_skin_color__cache[18] +#define GAUGE_COLOR mc_skin_color__cache[18] +#define INPUT_COLOR mc_skin_color__cache[19] -#define HELP_NORMAL_COLOR mc_skin_color__cache[19] -#define HELP_ITALIC_COLOR mc_skin_color__cache[20] -#define HELP_BOLD_COLOR mc_skin_color__cache[21] -#define HELP_LINK_COLOR mc_skin_color__cache[22] -#define HELP_SLINK_COLOR mc_skin_color__cache[23] +#define HELP_NORMAL_COLOR mc_skin_color__cache[20] +#define HELP_ITALIC_COLOR mc_skin_color__cache[21] +#define HELP_BOLD_COLOR mc_skin_color__cache[22] +#define HELP_LINK_COLOR mc_skin_color__cache[23] +#define HELP_SLINK_COLOR mc_skin_color__cache[24] -#define VIEW_UNDERLINED_COLOR mc_skin_color__cache[24] +#define VIEW_UNDERLINED_COLOR mc_skin_color__cache[25] /* * editor colors - only 4 for normal, search->found, select, and whitespace * respectively * Last is defined to view color. */ -#define EDITOR_NORMAL_COLOR mc_skin_color__cache[25] -#define EDITOR_BOLD_COLOR mc_skin_color__cache[26] -#define EDITOR_MARKED_COLOR mc_skin_color__cache[27] -#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[28] -#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[29] +#define EDITOR_NORMAL_COLOR mc_skin_color__cache[26] +#define EDITOR_BOLD_COLOR mc_skin_color__cache[27] +#define EDITOR_MARKED_COLOR mc_skin_color__cache[28] +#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[29] +#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[30] /* color of left 8 char status per line */ -#define LINE_STATE_COLOR mc_skin_color__cache[30] -#define BOOK_MARK_COLOR mc_skin_color__cache[31] -#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[32] +#define LINE_STATE_COLOR mc_skin_color__cache[31] +#define BOOK_MARK_COLOR mc_skin_color__cache[32] +#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[33] -#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[33] -#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[34] +#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[34] +#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[35] -#define MC_SKIN_COLOR_CACHE_COUNT 35 +#define MC_SKIN_COLOR_CACHE_COUNT 36 /*** enums ***************************************************************************************/ diff --git a/lib/skin/colors-old.c b/lib/skin/colors-old.c index 6521ca489..95f6d435a 100644 --- a/lib/skin/colors-old.c +++ b/lib/skin/colors-old.c @@ -66,6 +66,7 @@ mc_skin_colors_old_t old_colors[] = { {"menuhot", "menu", "menuhot"}, {"menusel", "menu", "menusel"}, {"menuhotsel", "menu", "menuhotsel"}, + {"menuinactive", "menu", "menuinactive"}, {"gauge", "core", "gauge"}, {"input", "core", "input"}, {"helpnormal", "help", "_default_"}, diff --git a/lib/skin/colors.c b/lib/skin/colors.c index b5f5c8e23..22f6c1ae0 100644 --- a/lib/skin/colors.c +++ b/lib/skin/colors.c @@ -208,6 +208,7 @@ mc_skin_color_cache_init (void) MENU_SELECTED_COLOR = mc_skin_color_get ("menu", "menusel"); MENU_HOT_COLOR = mc_skin_color_get ("menu", "menuhot"); MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", "menuhotsel"); + MENU_INACTIVE_COLOR = mc_skin_color_get ("menu", "menuinactive"); GAUGE_COLOR = mc_skin_color_get ("core", "gauge"); INPUT_COLOR = mc_skin_color_get ("core", "input"); @@ -231,8 +232,6 @@ mc_skin_color_cache_init (void) BOOK_MARK_FOUND_COLOR = mc_skin_color_get ("editor", "bookmarkfound"); BUTTONBAR_HOTKEY_COLOR = mc_skin_color_get ("buttonbar", "hotkey"); BUTTONBAR_BUTTON_COLOR = mc_skin_color_get ("buttonbar", "button"); - - } /* --------------------------------------------------------------------------------------------- */ diff --git a/lib/skin/hc-skins.c b/lib/skin/hc-skins.c index 17ebfefb7..7655bbb80 100644 --- a/lib/skin/hc-skins.c +++ b/lib/skin/hc-skins.c @@ -64,6 +64,7 @@ mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin) mc_config_set_string (mc_skin->config, "menu", "menuhot", "A_BOLD"); mc_config_set_string (mc_skin->config, "menu", "menusel", "default"); mc_config_set_string (mc_skin->config, "menu", "menuhotsel", "A_UNDERLINE"); + mc_config_set_string (mc_skin->config, "menu", "menuinactive", "A_REVERSE"); mc_config_set_string (mc_skin->config, "help", "_default_", "A_REVERSE"); mc_config_set_string (mc_skin->config, "help", "helpitalic", "A_REVERSE"); mc_config_set_string (mc_skin->config, "help", "helpbold", "A_REVERSE"); diff --git a/misc/skins/darkfar.ini b/misc/skins/darkfar.ini index 5a0ac9a2b..aa8fee243 100644 --- a/misc/skins/darkfar.ini +++ b/misc/skins/darkfar.ini @@ -20,7 +20,7 @@ _default_=lightgray;black selected=black;cyan marked=yellow;black - markselect=yellow;cyan; + markselect=yellow;cyan gauge=white;black input=black;cyan reverse=black;lightgray @@ -57,6 +57,7 @@ menuhot=white;blue menusel=black;cyan menuhotsel=white;cyan + menuinactive=black;white [help] _default_=black;lightgray diff --git a/misc/skins/default.ini b/misc/skins/default.ini index 1a63c8a21..f50a3ec15 100644 --- a/misc/skins/default.ini +++ b/misc/skins/default.ini @@ -20,7 +20,7 @@ _default_=lightgray;blue selected=black;cyan marked=yellow;blue - markselect=yellow;cyan; + markselect=yellow;cyan gauge=white;black input=black;cyan reverse=black;lightgray @@ -58,6 +58,7 @@ menuhot=yellow;cyan menusel=white;black menuhotsel=yellow;black + menuinactive=black;cyan [buttonbar] hotkey=white;black diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini index 387c60464..9793f657c 100644 --- a/misc/skins/double-lines.ini +++ b/misc/skins/double-lines.ini @@ -20,7 +20,7 @@ _default_=lightgray;blue selected=black;cyan marked=yellow;blue - markselect=yellow;cyan; + markselect=yellow;cyan gauge=white;black input=black;cyan reverse=black;lightgray @@ -58,6 +58,7 @@ menuhot=yellow;cyan menusel=white;black menuhotsel=yellow;black + menuinactive=lightgray;blue [help] _default_=black;lightgray diff --git a/misc/skins/featured.ini b/misc/skins/featured.ini index c21e25840..45d36f411 100644 --- a/misc/skins/featured.ini +++ b/misc/skins/featured.ini @@ -22,7 +22,7 @@ _default_=lightgray;blue selected=black;cyan marked=yellow;blue - markselect=yellow;cyan; + markselect=yellow;cyan gauge=white;black input=black;cyan reverse=black;lightgray @@ -60,6 +60,7 @@ menuhot=yellow;cyan menusel=white;black menuhotsel=yellow;black + menuinactive=black;cyan [buttonbar] hotkey=white;black diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini index 2639bee50..9c6793c99 100644 --- a/misc/skins/gotar.ini +++ b/misc/skins/gotar.ini @@ -57,6 +57,7 @@ menuhot=brightred; menusel=brightcyan;blue menuhotsel=yellow; + menuinactive=lightgray; [help] _default_=brightred;black diff --git a/src/args.c b/src/args.c index 60aa6d8c9..203650de3 100644 --- a/src/args.c +++ b/src/args.c @@ -314,7 +314,7 @@ mc_args_new_color_group(void) " File display: normal, selected, marked, markselect\n" " Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" " errdhotfocus\n" - " Menus: menu, menuhot, menusel, menuhotsel\n" + " Menus: menu, menuhot, menusel, menuhotsel, menuinactive\n" " Editor: editnormal, editbold, editmarked, editwhitespace,\n" " editlinestate\n"), /* TRANSLATORS: don't translate keywords and names of colors */ diff --git a/src/menu.c b/src/menu.c index ade349f46..6a074b55b 100644 --- a/src/menu.c +++ b/src/menu.c @@ -208,10 +208,12 @@ menubar_draw_drop (WMenuBar *menubar) static void menubar_set_color (WMenuBar *menubar, gboolean current, gboolean hotkey) { - if (!menubar->is_active || !current) - tty_setcolor (hotkey ? MENU_HOT_COLOR : MENU_ENTRY_COLOR); - else + if (!menubar->is_active) + tty_setcolor (MENU_INACTIVE_COLOR); + else if (current) tty_setcolor (hotkey ? MENU_HOTSEL_COLOR : MENU_SELECTED_COLOR); + else + tty_setcolor (hotkey ? MENU_HOT_COLOR : MENU_ENTRY_COLOR); } static void @@ -220,7 +222,7 @@ menubar_draw (WMenuBar *menubar) GList *i; /* First draw the complete menubar */ - tty_setcolor (MENU_ENTRY_COLOR); + tty_setcolor (menubar->is_active ? MENU_ENTRY_COLOR : MENU_INACTIVE_COLOR); tty_draw_hline (menubar->widget.y, menubar->widget.x, ' ', menubar->widget.cols); /* Now each one of the entries */