1
1

Ticket #1703: SKIN: Make own colorpairs for buttonbar widget

Now buttonbar have own colorpairs:

[buttonbar]
    hotkey=red;black
    button=yellow;cyan

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
Slava Zanko 2009-10-28 16:18:06 +02:00
родитель d98e14de49
Коммит 742eae18d2
7 изменённых файлов: 24 добавлений и 3 удалений

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

@ -77,6 +77,10 @@
[viewer] [viewer]
viewunderline=brightred;black viewunderline=brightred;black
[buttonbar]
hotkey=red;white
button=black;white
[widget-common] [widget-common]
sort-sign-up= sort-sign-up=
sort-sign-down= sort-sign-down=

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

@ -59,6 +59,10 @@
menusel=white;black menusel=white;black
menuhotsel=yellow;black menuhotsel=yellow;black
[buttonbar]
hotkey=white;black
button=black;cyan
[help] [help]
_default_=black;lightgray _default_=black;lightgray
helpitalic=red;lightgray helpitalic=red;lightgray

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

@ -61,6 +61,10 @@
menusel=white;black menusel=white;black
menuhotsel=yellow;black menuhotsel=yellow;black
[buttonbar]
hotkey=white;black
button=black;cyan
[help] [help]
_default_=black;lightgray _default_=black;lightgray
helpitalic=red;lightgray helpitalic=red;lightgray

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

@ -76,3 +76,7 @@
[viewer] [viewer]
viewunderline=brightgreen;black viewunderline=brightgreen;black
[buttonbar]
hotkey=brightgreen;white
button=black;blue

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

@ -230,6 +230,8 @@ mc_skin_color_cache_init (void)
LINE_STATE_COLOR = mc_skin_color_get ("editor", "linestate"); LINE_STATE_COLOR = mc_skin_color_get ("editor", "linestate");
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");
} }

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

@ -66,7 +66,10 @@
#define BOOK_MARK_COLOR mc_skin_color__cache[30] #define BOOK_MARK_COLOR mc_skin_color__cache[30]
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[31] #define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[31]
#define MC_SKIN_COLOR_CACHE_COUNT 32 #define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[32]
#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[33]
#define MC_SKIN_COLOR_CACHE_COUNT 34
/*** enums ***************************************************************************************/ /*** enums ***************************************************************************************/

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

@ -2597,9 +2597,9 @@ buttonbar_callback (Widget *w, widget_msg_t msg, int parm)
for (i = 0; i < COLS / bb->btn_width && i < BUTTONBAR_LABELS_NUM; i++) { for (i = 0; i < COLS / bb->btn_width && i < BUTTONBAR_LABELS_NUM; i++) {
widget_move (&bb->widget, 0, i * bb->btn_width); widget_move (&bb->widget, 0, i * bb->btn_width);
tty_setcolor (DEFAULT_COLOR); tty_setcolor (BUTTONBAR_HOTKEY_COLOR);
tty_printf ("%2d", i + 1); tty_printf ("%2d", i + 1);
tty_setcolor (SELECTED_COLOR); tty_setcolor (BUTTONBAR_BUTTON_COLOR);
text = (bb->labels[i].text != NULL) ? bb->labels[i].text : ""; text = (bb->labels[i].text != NULL) ? bb->labels[i].text : "";
tty_print_string (str_fit_to_term (text, bb->btn_width - 2, J_CENTER_LEFT)); tty_print_string (str_fit_to_term (text, bb->btn_width - 2, J_CENTER_LEFT));
} }