1
1

Ticket #2197: added new color for status bar

...and added missed colors for button bar.

Updated EN and RU man pages.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
Andrew Borodin 2010-11-11 14:05:34 +03:00
родитель 64835fe3c2
Коммит 3e7d76eb13
16 изменённых файлов: 91 добавлений и 54 удалений

Просмотреть файл

@ -3422,12 +3422,13 @@ The format for the color definition is:
.PP .PP
The colors are optional, and the keywords are: normal, selected, disabled, marked, The colors are optional, and the keywords are: normal, selected, disabled, marked,
markselect, errors, input, inputmark, inputunchanged, commandlinemark, markselect, errors, input, inputmark, inputunchanged, commandlinemark,
reverse, gauge, header, inputhistory, commandhistory. Menu colors are: menunormal, reverse, gauge, header, inputhistory, commandhistory. Button bar colors are:
bbarhotkey, bbarbutton. Status bar color: statusbar. Menu colors are: menunormal,
menusel, menuhot, menuhotsel, menuinactive. Dialog colors are: dnormal, dfocus, menusel, menuhot, menuhotsel, menuinactive. Dialog colors are: dnormal, dfocus,
dhotnormal, dhotfocus, dtitle. Error dialog colors are: errdfocus, errdhotnormal, dhotnormal, dhotfocus, dtitle. Error dialog colors are: errdfocus, errdhotnormal,
errdhotfocus, errdtitle. Help colors are: helpnormal, helpitalic, helpbold, errdhotfocus, errdtitle. Help colors are: helpnormal, helpitalic, helpbold,
helplink, helpslink, helptitle. Viewer color are: viewbold, viewunderline, viewselected. helplink, helpslink, helptitle. Viewer color are: viewbold, viewunderline, viewselected.
Editor colors are: editnormal, editbold, editmarked. Editor colors are: editnormal, editbold, editmarked, editwhitespace, editlinestate.
.PP .PP
.I input .I input
determines the color of input lines used in query dialogs. determines the color of input lines used in query dialogs.

Просмотреть файл

@ -3681,12 +3681,15 @@ xterm=menu=magenta:marked=,magenta:markselect=,red
Цвета не являются обязательными, а в качестве ключевых слов (keywords) Цвета не являются обязательными, а в качестве ключевых слов (keywords)
могут использоваться: для задания цветовой палитры в панелях: normal, могут использоваться: для задания цветовой палитры в панелях: normal,
selected, disabled, marked, markselect, errors, input, inputmark, inputunchanged, selected, disabled, marked, markselect, errors, input, inputmark, inputunchanged,
commandlinemark, reverse, gauge. Цвета пунктов меню: menunormal, menusel, commandlinemark, reverse, gauge, header, inputhistory, commandhistory. Цвета
menuhot, menuhotsel, menuinactive. Цвета в окне диалога: dnormal, dfocus, строки горячих клавиш F1\-F10: bbarhotkey, bbarbutton. Цвет строки статуса
dhotnormal, dhotfocus. Цвета в окне подсказки: helpnormal, helpitalic, редактора и программ просмотра и сравнения файлов: statusbar. Цвета пунктов меню:
helpbold, helplink, helpslink. Цвета в окне программы просмотра: menunormal, menusel, menuhot, menuhotsel, menuinactive. Цвета в окне диалога:
viewunderline. Специальные подсветки: executable, directory, link, device, dnormal, dfocus, dhotnormal, dhotfocus. Цвета в диалоге\-сообщении об ошибке:
special, core. Цвета в редакторе: editnormal, editbold, editmarked. errdfocus, errdhotnormal, errdhotfocus, errdtitle. Цвета в окне встроенной
помощи: helpnormal, helpitalic, helpbold, helplink, helpslink. Цвета в окне
программы просмотра: viewbold, viewunderline, viewselected. Цвета в редакторе:
editnormal, editbold, editmarked, editwhitespace, editlinestate.
.PP .PP
Цвета задавать не обязательно. Цвет какого именно поля определяется Цвета задавать не обязательно. Цвет какого именно поля определяется
каждым ключевым словом, можно понять из перевода этого ключевого слова. каждым ключевым словом, можно понять из перевода этого ключевого слова.
@ -3893,7 +3896,7 @@ base_color=normal=white,default:marked=magenta,default
.PP .PP
Секция Секция
.BR [error] .BR [error]
содержит описания элементов диалога об ошибках. содержит описания элементов диалога\-сообщения об ошибках.
.TP .TP
.I _default_ .I _default_
Цвет по умолчанию для данной секции. Если не указан, то используется [core]._default_ Цвет по умолчанию для данной секции. Если не указан, то используется [core]._default_

Просмотреть файл

@ -44,57 +44,59 @@
#define MENU_HOTSEL_COLOR mc_skin_color__cache[22] #define MENU_HOTSEL_COLOR mc_skin_color__cache[22]
#define MENU_INACTIVE_COLOR mc_skin_color__cache[23] #define MENU_INACTIVE_COLOR mc_skin_color__cache[23]
#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[24]
#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[25]
#define STATUSBAR_COLOR mc_skin_color__cache[26]
/* /*
* This should be selectable independently. Default has to be black background * This should be selectable independently. Default has to be black background
* foreground does not matter at all. * foreground does not matter at all.
*/ */
#define GAUGE_COLOR mc_skin_color__cache[24] #define GAUGE_COLOR mc_skin_color__cache[27]
#define INPUT_COLOR mc_skin_color__cache[25] #define INPUT_COLOR mc_skin_color__cache[28]
#define INPUT_UNCHANGED_COLOR mc_skin_color__cache[26] #define INPUT_UNCHANGED_COLOR mc_skin_color__cache[29]
#define INPUT_MARK_COLOR mc_skin_color__cache[27] #define INPUT_MARK_COLOR mc_skin_color__cache[30]
#define INPUT_HISTORY_COLOR mc_skin_color__cache[28] #define INPUT_HISTORY_COLOR mc_skin_color__cache[31]
#define COMMAND_HISTORY_COLOR mc_skin_color__cache[29] #define COMMAND_HISTORY_COLOR mc_skin_color__cache[32]
#define HELP_NORMAL_COLOR mc_skin_color__cache[30] #define HELP_NORMAL_COLOR mc_skin_color__cache[33]
#define HELP_ITALIC_COLOR mc_skin_color__cache[31] #define HELP_ITALIC_COLOR mc_skin_color__cache[34]
#define HELP_BOLD_COLOR mc_skin_color__cache[32] #define HELP_BOLD_COLOR mc_skin_color__cache[35]
#define HELP_LINK_COLOR mc_skin_color__cache[33] #define HELP_LINK_COLOR mc_skin_color__cache[36]
#define HELP_SLINK_COLOR mc_skin_color__cache[34] #define HELP_SLINK_COLOR mc_skin_color__cache[37]
#define HELP_TITLE_COLOR mc_skin_color__cache[35] #define HELP_TITLE_COLOR mc_skin_color__cache[38]
#define VIEW_BOLD_COLOR mc_skin_color__cache[36] #define VIEW_BOLD_COLOR mc_skin_color__cache[39]
#define VIEW_UNDERLINED_COLOR mc_skin_color__cache[37] #define VIEW_UNDERLINED_COLOR mc_skin_color__cache[40]
#define VIEW_SELECTED_COLOR mc_skin_color__cache[38] #define VIEW_SELECTED_COLOR mc_skin_color__cache[41]
/* /*
* editor colors - only 4 for normal, search->found, select, and whitespace * editor colors - only 4 for normal, search->found, select, and whitespace
* respectively * respectively
* Last is defined to view color. * Last is defined to view color.
*/ */
#define EDITOR_NORMAL_COLOR mc_skin_color__cache[39] #define EDITOR_NORMAL_COLOR mc_skin_color__cache[42]
#define EDITOR_BOLD_COLOR mc_skin_color__cache[40] #define EDITOR_BOLD_COLOR mc_skin_color__cache[43]
#define EDITOR_MARKED_COLOR mc_skin_color__cache[41] #define EDITOR_MARKED_COLOR mc_skin_color__cache[44]
#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[42] #define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[45]
#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[43] #define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[46]
/* color of left 8 char status per line */ /* color of left 8 char status per line */
#define LINE_STATE_COLOR mc_skin_color__cache[44] #define LINE_STATE_COLOR mc_skin_color__cache[47]
#define BOOK_MARK_COLOR mc_skin_color__cache[45] #define BOOK_MARK_COLOR mc_skin_color__cache[48]
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[46] #define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[49]
#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[47]
#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[48]
/* Diff colors */ /* Diff colors */
#define DFF_ADD_COLOR mc_skin_color__cache[49] #define DFF_ADD_COLOR mc_skin_color__cache[50]
#define DFF_CHG_COLOR mc_skin_color__cache[50] #define DFF_CHG_COLOR mc_skin_color__cache[51]
#define DFF_CHH_COLOR mc_skin_color__cache[51] #define DFF_CHH_COLOR mc_skin_color__cache[52]
#define DFF_CHD_COLOR mc_skin_color__cache[52] #define DFF_CHD_COLOR mc_skin_color__cache[53]
#define DFF_DEL_COLOR mc_skin_color__cache[53] #define DFF_DEL_COLOR mc_skin_color__cache[54]
#define DFF_FOLDER_COLOR mc_skin_color__cache[54] #define DFF_FOLDER_COLOR mc_skin_color__cache[55]
#define DFF_ERROR_COLOR mc_skin_color__cache[55] #define DFF_ERROR_COLOR mc_skin_color__cache[56]
#define MC_SKIN_COLOR_CACHE_COUNT 56 #define MC_SKIN_COLOR_CACHE_COUNT 57
/*** enums ***************************************************************************************/ /*** enums ***************************************************************************************/

Просмотреть файл

@ -28,12 +28,12 @@
#include <config.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> /* size_t */ #include <sys/types.h> /* size_t */
#include "lib/tty/color.h"
#include "internal.h" #include "internal.h"
#include "src/setup.h" #include "lib/tty/color.h"
#include "src/setup.h"
/*** global variables ****************************************************************************/ /*** global variables ****************************************************************************/
@ -69,6 +69,9 @@ static const mc_skin_colors_old_t old_colors[] = {
{"menusel", "menu", "menusel"}, {"menusel", "menu", "menusel"},
{"menuhotsel", "menu", "menuhotsel"}, {"menuhotsel", "menu", "menuhotsel"},
{"menuinactive", "menu", "menuinactive"}, {"menuinactive", "menu", "menuinactive"},
{"bbarhotkey", "buttonbar", "hotkey"},
{"bbarbutton", "buttonbar", "button"},
{"statusbar", "statusbar", "_default_"},
{"gauge", "core", "gauge"}, {"gauge", "core", "gauge"},
{"input", "core", "input"}, {"input", "core", "input"},
{"inputmark", "core", "inputmark"}, {"inputmark", "core", "inputmark"},

Просмотреть файл

@ -29,6 +29,7 @@
#include <string.h> #include <string.h>
#include "internal.h" #include "internal.h"
#include "lib/tty/color.h" #include "lib/tty/color.h"
#include "src/args.h" #include "src/args.h"
@ -225,6 +226,11 @@ mc_skin_color_cache_init (void)
MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", "menuhotsel"); MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", "menuhotsel");
MENU_INACTIVE_COLOR = mc_skin_color_get ("menu", "menuinactive"); MENU_INACTIVE_COLOR = mc_skin_color_get ("menu", "menuinactive");
BUTTONBAR_HOTKEY_COLOR = mc_skin_color_get ("buttonbar", "hotkey");
BUTTONBAR_BUTTON_COLOR = mc_skin_color_get ("buttonbar", "button");
STATUSBAR_COLOR = mc_skin_color_get ("statusbar", "_default_");
GAUGE_COLOR = mc_skin_color_get ("core", "gauge"); GAUGE_COLOR = mc_skin_color_get ("core", "gauge");
INPUT_COLOR = mc_skin_color_get ("core", "input"); INPUT_COLOR = mc_skin_color_get ("core", "input");
INPUT_HISTORY_COLOR = mc_skin_color_get ("core", "inputhistory"); INPUT_HISTORY_COLOR = mc_skin_color_get ("core", "inputhistory");
@ -252,8 +258,6 @@ mc_skin_color_cache_init (void)
BOOK_MARK_COLOR = mc_skin_color_get ("editor", "bookmark"); BOOK_MARK_COLOR = mc_skin_color_get ("editor", "bookmark");
BOOK_MARK_FOUND_COLOR = mc_skin_color_get ("editor", "bookmarkfound"); 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");
DFF_ADD_COLOR = mc_skin_color_get ("diffviewer", "added"); DFF_ADD_COLOR = mc_skin_color_get ("diffviewer", "added");
DFF_CHG_COLOR = mc_skin_color_get ("diffviewer", "changedline"); DFF_CHG_COLOR = mc_skin_color_get ("diffviewer", "changedline");

Просмотреть файл

@ -66,6 +66,7 @@ mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin)
mc_config_set_string (mc_skin->config, "menu", "menusel", "default"); 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", "menuhotsel", "A_UNDERLINE");
mc_config_set_string (mc_skin->config, "menu", "menuinactive", "A_REVERSE"); mc_config_set_string (mc_skin->config, "menu", "menuinactive", "A_REVERSE");
mc_config_set_string (mc_skin->config, "statusbar", "_default_", "A_REVERSE");
mc_config_set_string (mc_skin->config, "help", "_default_", "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", "helpitalic", "A_REVERSE");
mc_config_set_string (mc_skin->config, "help", "helpbold", "A_REVERSE"); mc_config_set_string (mc_skin->config, "help", "helpbold", "A_REVERSE");

Просмотреть файл

@ -113,6 +113,9 @@
hotkey=red;white hotkey=red;white
button=black;white button=black;white
[statusbar]
_default_=black;white
[widget-common] [widget-common]
sort-sign-up= sort-sign-up=
sort-sign-down= sort-sign-down=

Просмотреть файл

@ -82,6 +82,9 @@
hotkey=white;black hotkey=white;black
button=black;cyan button=black;cyan
[statusbar]
_default_=black;cyan
[help] [help]
_default_=black;lightgray _default_=black;lightgray
helpitalic=red;lightgray helpitalic=red;lightgray

Просмотреть файл

@ -77,6 +77,13 @@
menuhotsel=yellow;black menuhotsel=yellow;black
menuinactive=lightgray;blue menuinactive=lightgray;blue
[buttonbar]
hotkey=lightgray;blue
button=lightgray;blue
[statusbar]
_default_=black;cyan
[help] [help]
_default_=black;lightgray _default_=black;lightgray
helpitalic=red;lightgray helpitalic=red;lightgray

Просмотреть файл

@ -83,6 +83,9 @@
hotkey=white;black hotkey=white;black
button=black;cyan button=black;cyan
[statusbar]
_default_=black;cyan
[help] [help]
_default_=black;lightgray _default_=black;lightgray
helpitalic=red;lightgray helpitalic=red;lightgray

Просмотреть файл

@ -74,6 +74,13 @@
menuhotsel=yellow; menuhotsel=yellow;
menuinactive=lightgray; menuinactive=lightgray;
[buttonbar]
hotkey=lightgray;black
button=white;blue
[statusbar]
_default_=white;blue
[help] [help]
_default_=brightred;black _default_=brightred;black
helpitalic=brightcyan; helpitalic=brightcyan;
@ -106,7 +113,3 @@
removed=;blue removed=;blue
folder=brightblue; folder=brightblue;
error=white;red error=white;red
[buttonbar]
hotkey=lightgray;black
button=white;blue

Просмотреть файл

@ -71,6 +71,9 @@
hotkey=lightgray;blue hotkey=lightgray;blue
button=lightgray;black button=lightgray;black
[statusbar]
_default_=lightgray;black
[help] [help]
_default_=lightgray;darkgray _default_=lightgray;darkgray
helpitalic=red;darkgray helpitalic=red;darkgray

Просмотреть файл

@ -329,6 +329,7 @@ mc_args_new_color_group (void)
"\n" "Keywords:\n" "\n" "Keywords:\n"
" Global: errors, disabled, reverse, gauge, viewunderline\n" " Global: errors, disabled, reverse, gauge, viewunderline\n"
" input, inputmark, inputunchanged, commandlinemark\n" " input, inputmark, inputunchanged, commandlinemark\n"
" bbarhotkey, bbarbutton, statusbar\n"
" File display: normal, selected, marked, markselect\n" " File display: normal, selected, marked, markselect\n"
" Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" " Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n"
" errdhotfocus\n" " errdhotfocus\n"

Просмотреть файл

@ -2706,7 +2706,7 @@ dview_status (const WDiff * dview, int ord, int width, int c)
int filename_width; int filename_width;
int linenum, lineofs; int linenum, lineofs;
tty_setcolor (SELECTED_COLOR); tty_setcolor (STATUSBAR_COLOR);
tty_gotoyx (0, c); tty_gotoyx (0, c);
get_line_numbers (dview->a[ord], skip_rows, &linenum, &lineofs); get_line_numbers (dview->a[ord], skip_rows, &linenum, &lineofs);

Просмотреть файл

@ -193,7 +193,7 @@ edit_status (WEdit * edit)
} }
widget_move (edit, 0, 0); widget_move (edit, 0, 0);
tty_setcolor (SELECTED_COLOR); tty_setcolor (STATUSBAR_COLOR);
printwstr (fname, fname_len + gap); printwstr (fname, fname_len + gap);
printwstr (status, w - (fname_len + gap)); printwstr (status, w - (fname_len + gap));

Просмотреть файл

@ -138,7 +138,7 @@ mcview_display_status (mcview_t * view)
if (height < 1) if (height < 1)
return; return;
tty_setcolor (SELECTED_COLOR); tty_setcolor (STATUSBAR_COLOR);
widget_move (view, top, left); widget_move (view, top, left);
tty_draw_hline (-1, -1, ' ', width); tty_draw_hline (-1, -1, ' ', width);