mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Merge branch '1999_inactive_menu_colors'
* 1999_inactive_menu_colors: Ticket #1999: changed color of inactive visible main menu.
This commit is contained in:
commit
48b71733b0
39
lib/skin.h
39
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 ***************************************************************************************/
|
||||
|
@ -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_"},
|
||||
|
@ -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");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -57,6 +57,7 @@
|
||||
menuhot=brightred;
|
||||
menusel=brightcyan;blue
|
||||
menuhotsel=yellow;
|
||||
menuinactive=lightgray;
|
||||
|
||||
[help]
|
||||
_default_=brightred;black
|
||||
|
@ -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 */
|
||||
|
10
src/menu.c
10
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user