-
diff --git a/doc/man/mc.1.in b/doc/man/mc.1.in
index cc4c6c68b..4aa0ea152 100644
a
|
b
|
overwriting files, execution by pressing enter, quitting the program, |
2113 | 2113 | directory hotlist entries deletion and history cleanup. |
2114 | 2114 | .\"NODE " Appearance" |
2115 | 2115 | .SH " Appearance" |
2116 | | In this dialog you can select the skin to be used. |
| 2116 | In this dialog you can select the skin to be used and enable dialog and menu shadows. |
2117 | 2117 | .PP |
2118 | 2118 | See the |
2119 | 2119 | .\"LINK2" |
2120 | 2120 | Skins |
2121 | 2121 | .\"Skins" |
2122 | 2122 | section for technical details about the skin definition files. |
| 2123 | .PP |
| 2124 | .I Dialog shadows. |
| 2125 | If this option is enabled, all dialogs and menus will have a "shadow" on the right |
| 2126 | and bottom side. If disabled, dialogs and menus will be just flat. |
2123 | 2127 | .\"NODE " Display bits" |
2124 | 2128 | .SH " Display bits" |
2125 | 2129 | This is used to configure the range of visible characters on the |
-
diff --git a/lib/global.c b/lib/global.c
index 137bfbdd3..95136979f 100644
a
|
b
|
mc_global_t mc_global = { |
85 | 85 | .tty = |
86 | 86 | { |
87 | 87 | .skin = NULL, |
| 88 | .dialog_shadows = TRUE, |
88 | 89 | .setup_color_string = NULL, |
89 | 90 | .term_color_string = NULL, |
90 | 91 | .color_terminal_string = NULL, |
-
diff --git a/lib/global.h b/lib/global.h
index 846c724c6..e96753419 100644
a
|
b
|
typedef struct |
230 | 230 | { |
231 | 231 | /* Use the specified skin */ |
232 | 232 | char *skin; |
| 233 | /* Dialog and menu window have a shadow (on the right and bottom side) */ |
| 234 | gboolean dialog_shadows; |
233 | 235 | |
234 | 236 | char *setup_color_string; |
235 | 237 | char *term_color_string; |
-
diff --git a/lib/skin.h b/lib/skin.h
index 747a504ec..155a8db9c 100644
a
|
b
|
|
22 | 22 | #define REVERSE_COLOR mc_skin_color__cache[6] |
23 | 23 | #define COMMAND_MARK_COLOR mc_skin_color__cache[7] |
24 | 24 | #define HEADER_COLOR mc_skin_color__cache[8] |
| 25 | #define SHADOW_COLOR mc_skin_color__cache[9] |
25 | 26 | |
26 | 27 | /* Dialog colors */ |
27 | | #define COLOR_NORMAL mc_skin_color__cache[9] |
28 | | #define COLOR_FOCUS mc_skin_color__cache[10] |
29 | | #define COLOR_HOT_NORMAL mc_skin_color__cache[11] |
30 | | #define COLOR_HOT_FOCUS mc_skin_color__cache[12] |
31 | | #define COLOR_TITLE mc_skin_color__cache[13] |
| 28 | #define COLOR_NORMAL mc_skin_color__cache[10] |
| 29 | #define COLOR_FOCUS mc_skin_color__cache[11] |
| 30 | #define COLOR_HOT_NORMAL mc_skin_color__cache[12] |
| 31 | #define COLOR_HOT_FOCUS mc_skin_color__cache[13] |
| 32 | #define COLOR_TITLE mc_skin_color__cache[14] |
32 | 33 | |
33 | 34 | /* Error dialog colors */ |
34 | | #define ERROR_COLOR mc_skin_color__cache[14] |
35 | | #define ERROR_FOCUS mc_skin_color__cache[15] |
36 | | #define ERROR_HOT_NORMAL mc_skin_color__cache[16] |
37 | | #define ERROR_HOT_FOCUS mc_skin_color__cache[17] |
38 | | #define ERROR_TITLE mc_skin_color__cache[18] |
| 35 | #define ERROR_COLOR mc_skin_color__cache[15] |
| 36 | #define ERROR_FOCUS mc_skin_color__cache[16] |
| 37 | #define ERROR_HOT_NORMAL mc_skin_color__cache[17] |
| 38 | #define ERROR_HOT_FOCUS mc_skin_color__cache[18] |
| 39 | #define ERROR_TITLE mc_skin_color__cache[19] |
39 | 40 | |
40 | 41 | /* Menu colors */ |
41 | | #define MENU_ENTRY_COLOR mc_skin_color__cache[19] |
42 | | #define MENU_SELECTED_COLOR mc_skin_color__cache[20] |
43 | | #define MENU_HOT_COLOR mc_skin_color__cache[21] |
44 | | #define MENU_HOTSEL_COLOR mc_skin_color__cache[22] |
45 | | #define MENU_INACTIVE_COLOR mc_skin_color__cache[23] |
| 42 | #define MENU_ENTRY_COLOR mc_skin_color__cache[20] |
| 43 | #define MENU_SELECTED_COLOR mc_skin_color__cache[21] |
| 44 | #define MENU_HOT_COLOR mc_skin_color__cache[22] |
| 45 | #define MENU_HOTSEL_COLOR mc_skin_color__cache[23] |
| 46 | #define MENU_INACTIVE_COLOR mc_skin_color__cache[24] |
46 | 47 | |
47 | 48 | /* Popup menu colors */ |
48 | | #define PMENU_ENTRY_COLOR mc_skin_color__cache[24] |
49 | | #define PMENU_SELECTED_COLOR mc_skin_color__cache[25] |
50 | | #define PMENU_HOT_COLOR mc_skin_color__cache[26] /* unused: not implemented yet */ |
51 | | #define PMENU_HOTSEL_COLOR mc_skin_color__cache[27] /* unused: not implemented yet */ |
52 | | #define PMENU_TITLE_COLOR mc_skin_color__cache[28] |
| 49 | #define PMENU_ENTRY_COLOR mc_skin_color__cache[25] |
| 50 | #define PMENU_SELECTED_COLOR mc_skin_color__cache[26] |
| 51 | #define PMENU_HOT_COLOR mc_skin_color__cache[27] /* unused: not implemented yet */ |
| 52 | #define PMENU_HOTSEL_COLOR mc_skin_color__cache[28] /* unused: not implemented yet */ |
| 53 | #define PMENU_TITLE_COLOR mc_skin_color__cache[29] |
53 | 54 | |
54 | | #define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[29] |
55 | | #define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[30] |
| 55 | #define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[30] |
| 56 | #define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[31] |
56 | 57 | |
57 | | #define STATUSBAR_COLOR mc_skin_color__cache[31] |
| 58 | #define STATUSBAR_COLOR mc_skin_color__cache[32] |
58 | 59 | |
59 | 60 | /* |
60 | 61 | * This should be selectable independently. Default has to be black background |
61 | 62 | * foreground does not matter at all. |
62 | 63 | */ |
63 | | #define GAUGE_COLOR mc_skin_color__cache[32] |
64 | | #define INPUT_COLOR mc_skin_color__cache[33] |
65 | | #define INPUT_UNCHANGED_COLOR mc_skin_color__cache[34] |
66 | | #define INPUT_MARK_COLOR mc_skin_color__cache[35] |
67 | | #define INPUT_HISTORY_COLOR mc_skin_color__cache[36] |
68 | | #define COMMAND_HISTORY_COLOR mc_skin_color__cache[37] |
69 | | |
70 | | #define HELP_NORMAL_COLOR mc_skin_color__cache[38] |
71 | | #define HELP_ITALIC_COLOR mc_skin_color__cache[39] |
72 | | #define HELP_BOLD_COLOR mc_skin_color__cache[40] |
73 | | #define HELP_LINK_COLOR mc_skin_color__cache[41] |
74 | | #define HELP_SLINK_COLOR mc_skin_color__cache[42] |
75 | | #define HELP_TITLE_COLOR mc_skin_color__cache[43] |
76 | | |
77 | | |
78 | | #define VIEW_NORMAL_COLOR mc_skin_color__cache[44] |
79 | | #define VIEW_BOLD_COLOR mc_skin_color__cache[45] |
80 | | #define VIEW_UNDERLINED_COLOR mc_skin_color__cache[46] |
81 | | #define VIEW_SELECTED_COLOR mc_skin_color__cache[47] |
| 64 | #define GAUGE_COLOR mc_skin_color__cache[33] |
| 65 | #define INPUT_COLOR mc_skin_color__cache[34] |
| 66 | #define INPUT_UNCHANGED_COLOR mc_skin_color__cache[35] |
| 67 | #define INPUT_MARK_COLOR mc_skin_color__cache[36] |
| 68 | #define INPUT_HISTORY_COLOR mc_skin_color__cache[37] |
| 69 | #define COMMAND_HISTORY_COLOR mc_skin_color__cache[38] |
| 70 | |
| 71 | #define HELP_NORMAL_COLOR mc_skin_color__cache[39] |
| 72 | #define HELP_ITALIC_COLOR mc_skin_color__cache[40] |
| 73 | #define HELP_BOLD_COLOR mc_skin_color__cache[41] |
| 74 | #define HELP_LINK_COLOR mc_skin_color__cache[42] |
| 75 | #define HELP_SLINK_COLOR mc_skin_color__cache[43] |
| 76 | #define HELP_TITLE_COLOR mc_skin_color__cache[44] |
| 77 | |
| 78 | |
| 79 | #define VIEW_NORMAL_COLOR mc_skin_color__cache[45] |
| 80 | #define VIEW_BOLD_COLOR mc_skin_color__cache[46] |
| 81 | #define VIEW_UNDERLINED_COLOR mc_skin_color__cache[47] |
| 82 | #define VIEW_SELECTED_COLOR mc_skin_color__cache[48] |
82 | 83 | |
83 | 84 | /* |
84 | 85 | * editor colors - only 4 for normal, search->found, select, and whitespace |
85 | 86 | * respectively |
86 | 87 | * Last is defined to view color. |
87 | 88 | */ |
88 | | #define EDITOR_NORMAL_COLOR mc_skin_color__cache[48] |
89 | | #define EDITOR_BOLD_COLOR mc_skin_color__cache[49] |
90 | | #define EDITOR_MARKED_COLOR mc_skin_color__cache[50] |
91 | | #define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[51] |
92 | | #define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[52] |
93 | | #define EDITOR_BACKGROUND mc_skin_color__cache[53] |
94 | | #define EDITOR_FRAME mc_skin_color__cache[54] |
95 | | #define EDITOR_FRAME_ACTIVE mc_skin_color__cache[55] |
96 | | #define EDITOR_FRAME_DRAG mc_skin_color__cache[56] |
| 89 | #define EDITOR_NORMAL_COLOR mc_skin_color__cache[49] |
| 90 | #define EDITOR_BOLD_COLOR mc_skin_color__cache[50] |
| 91 | #define EDITOR_MARKED_COLOR mc_skin_color__cache[51] |
| 92 | #define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[52] |
| 93 | #define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[53] |
| 94 | #define EDITOR_BACKGROUND mc_skin_color__cache[54] |
| 95 | #define EDITOR_FRAME mc_skin_color__cache[55] |
| 96 | #define EDITOR_FRAME_ACTIVE mc_skin_color__cache[56] |
| 97 | #define EDITOR_FRAME_DRAG mc_skin_color__cache[57] |
97 | 98 | /* color of left 8 char status per line */ |
98 | | #define LINE_STATE_COLOR mc_skin_color__cache[57] |
99 | | #define BOOK_MARK_COLOR mc_skin_color__cache[58] |
100 | | #define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[59] |
| 99 | #define LINE_STATE_COLOR mc_skin_color__cache[58] |
| 100 | #define BOOK_MARK_COLOR mc_skin_color__cache[59] |
| 101 | #define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[60] |
101 | 102 | |
102 | 103 | /* Diff colors */ |
103 | | #define DFF_ADD_COLOR mc_skin_color__cache[60] |
104 | | #define DFF_CHG_COLOR mc_skin_color__cache[61] |
105 | | #define DFF_CHH_COLOR mc_skin_color__cache[62] |
106 | | #define DFF_CHD_COLOR mc_skin_color__cache[63] |
107 | | #define DFF_DEL_COLOR mc_skin_color__cache[64] |
108 | | #define DFF_ERROR_COLOR mc_skin_color__cache[65] |
109 | | |
110 | | #define MC_SKIN_COLOR_CACHE_COUNT 66 |
| 104 | #define DFF_ADD_COLOR mc_skin_color__cache[61] |
| 105 | #define DFF_CHG_COLOR mc_skin_color__cache[62] |
| 106 | #define DFF_CHH_COLOR mc_skin_color__cache[63] |
| 107 | #define DFF_CHD_COLOR mc_skin_color__cache[64] |
| 108 | #define DFF_DEL_COLOR mc_skin_color__cache[65] |
| 109 | #define DFF_ERROR_COLOR mc_skin_color__cache[66] |
| 110 | |
| 111 | #define MC_SKIN_COLOR_CACHE_COUNT 67 |
111 | 112 | |
112 | 113 | /*** enums ***************************************************************************************/ |
113 | 114 | |
-
diff --git a/lib/skin/colors.c b/lib/skin/colors.c
index b8d944a41..27e18bdda 100644
a
|
b
|
mc_skin_color_cache_init (void) |
249 | 249 | REVERSE_COLOR = mc_skin_color_get ("core", "reverse"); |
250 | 250 | HEADER_COLOR = mc_skin_color_get ("core", "header"); |
251 | 251 | COMMAND_MARK_COLOR = mc_skin_color_get ("core", "commandlinemark"); |
| 252 | SHADOW_COLOR = mc_skin_color_get ("core", "shadow"); |
252 | 253 | |
253 | 254 | COLOR_NORMAL = mc_skin_color_get ("dialog", "_default_"); |
254 | 255 | COLOR_FOCUS = mc_skin_color_get ("dialog", "dfocus"); |
-
diff --git a/lib/tty/tty-internal.h b/lib/tty/tty-internal.h
index 662b0bcaf..69b8ff963 100644
a
|
b
|
|
17 | 17 | #define NULL_VALUE 255 |
18 | 18 | #endif |
19 | 19 | |
| 20 | #define yx_in_screen(y,x) \ |
| 21 | (y >= 0 && y < LINES && x >= 0 && x < COLS) |
| 22 | |
20 | 23 | /*** enums ***************************************************************************************/ |
21 | 24 | |
22 | 25 | /*** structures declarations (and typedefs of structures)*****************************************/ |
… |
… |
char *mc_tty_normalize_from_utf8 (const char *); |
42 | 45 | void tty_init_xterm_support (gboolean is_xterm); |
43 | 46 | int tty_lowlevel_getch (void); |
44 | 47 | |
| 48 | void tty_colorize_area (int y, int x, int rows, int cols, int color); |
| 49 | |
45 | 50 | /*** inline functions ****************************************************************************/ |
46 | 51 | |
47 | 52 | #endif /* MC_TTY_INTERNAL_H */ |
-
diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
index 4383d1e74..9689ff292 100644
a
|
b
|
|
48 | 48 | |
49 | 49 | #include "tty-internal.h" /* mc_tty_normalize_from_utf8() */ |
50 | 50 | #include "tty.h" |
| 51 | #include "color.h" /* tty_setcolor */ |
51 | 52 | #include "color-internal.h" |
52 | 53 | #include "key.h" |
53 | 54 | #include "mouse.h" |
… |
… |
|
70 | 71 | #define CTRL(x) ((x) & 0x1f) |
71 | 72 | #endif |
72 | 73 | |
73 | | #define yx_in_screen(y, x) \ |
74 | | (y >= 0 && y < LINES && x >= 0 && x < COLS) |
75 | | |
76 | 74 | /*** global variables ****************************************************************************/ |
77 | 75 | |
78 | 76 | /*** file scope type declarations ****************************************************************/ |
… |
… |
tty_fill_region (int y, int x, int rows, int cols, unsigned char ch) |
533 | 531 | |
534 | 532 | /* --------------------------------------------------------------------------------------------- */ |
535 | 533 | |
| 534 | void |
| 535 | tty_colorize_area (int y, int x, int rows, int cols, int color) |
| 536 | { |
| 537 | cchar_t *ctext; |
| 538 | wchar_t wch[10]; /* TODO not sure if the length is correct */ |
| 539 | attr_t attrs; |
| 540 | short color_pair; |
| 541 | |
| 542 | if (!use_colors || !yx_in_screenx (y, x)) |
| 543 | return; |
| 544 | |
| 545 | tty_setcolor (color); |
| 546 | ctext = g_malloc (sizeof (cchar_t) * (cols + 1)); |
| 547 | |
| 548 | for (int row = 0; row < rows; row++) |
| 549 | { |
| 550 | mvin_wchnstr (y + row, x, ctext, cols); |
| 551 | |
| 552 | for (int col = 0; col < cols; col++) |
| 553 | { |
| 554 | getcchar (&ctext[col], wch, &attrs, &color_pair, NULL); |
| 555 | setcchar (&ctext[col], wch, attrs, color, NULL); |
| 556 | } |
| 557 | |
| 558 | mvadd_wchnstr (y + row, x, ctext, cols); |
| 559 | } |
| 560 | |
| 561 | g_free (ctext); |
| 562 | } |
| 563 | |
| 564 | /* --------------------------------------------------------------------------------------------- */ |
| 565 | |
536 | 566 | void |
537 | 567 | tty_set_alt_charset (gboolean alt_charset) |
538 | 568 | { |
-
diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c
index 0d8e89ff7..24bcb9e1d 100644
a
|
b
|
tty_fill_region (int y, int x, int rows, int cols, unsigned char ch) |
622 | 622 | |
623 | 623 | /* --------------------------------------------------------------------------------------------- */ |
624 | 624 | |
| 625 | void |
| 626 | tty_colorize_area (int y, int x, int rows, int cols, int color) |
| 627 | { |
| 628 | if (use_colors && yx_in_screen (y, x)) |
| 629 | SLsmg_set_color_in_region (color, y, x, rows, cols); |
| 630 | } |
| 631 | |
| 632 | /* --------------------------------------------------------------------------------------------- */ |
| 633 | |
625 | 634 | void |
626 | 635 | tty_set_alt_charset (gboolean alt_charset) |
627 | 636 | { |
-
diff --git a/lib/tty/tty.c b/lib/tty/tty.c
index a3929b011..d4a731343 100644
a
|
b
|
tty_draw_box (int y, int x, int ys, int xs, gboolean single) |
264 | 264 | |
265 | 265 | /* --------------------------------------------------------------------------------------------- */ |
266 | 266 | |
| 267 | void |
| 268 | tty_draw_box_shadow (int y, int x, int rows, int cols, int shadow_color) |
| 269 | { |
| 270 | /* draw right shadow */ |
| 271 | tty_colorize_area (y + 1, x + cols, rows - 1, 2, shadow_color); |
| 272 | /* draw bottom shadow */ |
| 273 | tty_colorize_area (y + rows, x + 2, 1, cols, shadow_color); |
| 274 | } |
| 275 | |
| 276 | /* --------------------------------------------------------------------------------------------- */ |
| 277 | |
267 | 278 | char * |
268 | 279 | mc_tty_normalize_from_utf8 (const char *str) |
269 | 280 | { |
-
diff --git a/lib/tty/tty.h b/lib/tty/tty.h
index fb1d94da8..5b9bf684f 100644
a
|
b
|
extern void tty_print_one_hline (gboolean single); |
126 | 126 | extern void tty_draw_hline (int y, int x, int ch, int len); |
127 | 127 | extern void tty_draw_vline (int y, int x, int ch, int len); |
128 | 128 | extern void tty_draw_box (int y, int x, int rows, int cols, gboolean single); |
| 129 | extern void tty_draw_box_shadow (int y, int x, int rows, int cols, int shadow_color); |
129 | 130 | extern void tty_fill_region (int y, int x, int rows, int cols, unsigned char ch); |
130 | 131 | |
131 | 132 | extern int tty_resize (int fd); |
-
diff --git a/lib/widget/frame.c b/lib/widget/frame.c
index 1f4f14d8a..1b02e9258 100644
a
|
b
|
frame_draw (const WFrame * f) |
76 | 76 | |
77 | 77 | colors = widget_get_colors (w); |
78 | 78 | |
| 79 | if (mc_global.tty.dialog_shadows) |
| 80 | tty_draw_box_shadow (w->y, w->x, w->lines, w->cols, SHADOW_COLOR); |
| 81 | |
79 | 82 | tty_setcolor (colors[FRAME_COLOR_NORMAL]); |
80 | 83 | tty_fill_region (w->y, w->x, w->lines, w->cols, ' '); |
81 | 84 | tty_draw_box (w->y + d, w->x + d, w->lines - 2 * d, w->cols - 2 * d, f->single); |
-
diff --git a/lib/widget/menu.c b/lib/widget/menu.c
index ca2ff472a..df337a357 100644
a
|
b
|
menubar_draw_drop (const WMenuBar * menubar) |
187 | 187 | if (column + menu->max_entry_len + 5 > (gsize) w->cols) |
188 | 188 | column = w->cols - menu->max_entry_len - 5; |
189 | 189 | |
| 190 | if (mc_global.tty.dialog_shadows) |
| 191 | tty_draw_box_shadow (w->y + 1, w->x + column, count + 2, menu->max_entry_len + 5, |
| 192 | SHADOW_COLOR); |
| 193 | |
190 | 194 | tty_setcolor (MENU_ENTRY_COLOR); |
191 | 195 | tty_draw_box (w->y + 1, w->x + column, count + 2, menu->max_entry_len + 5, FALSE); |
192 | 196 | |
-
diff --git a/misc/skins/dark.ini b/misc/skins/dark.ini
index 58d6f8351..0cfeb8ecf 100644
a
|
b
|
|
39 | 39 | header = yellow;black |
40 | 40 | inputhistory = |
41 | 41 | commandhistory = |
| 42 | shadow = gray;black |
42 | 43 | |
43 | 44 | [dialog] |
44 | 45 | _default_ = brightcyan;blue |
-
diff --git a/misc/skins/darkfar.ini b/misc/skins/darkfar.ini
index e0e1a5879..c6dcf68f2 100644
a
|
b
|
|
39 | 39 | header = yellow;black |
40 | 40 | inputhistory = |
41 | 41 | commandhistory = |
| 42 | shadow = gray;black |
42 | 43 | |
43 | 44 | [dialog] |
44 | 45 | _default_ = brightcyan;blue |
-
diff --git a/misc/skins/default.ini b/misc/skins/default.ini
index afc060ade..145eb998b 100644
a
|
b
|
|
39 | 39 | header = yellow;blue |
40 | 40 | inputhistory = |
41 | 41 | commandhistory = |
| 42 | shadow = gray;black |
42 | 43 | |
43 | 44 | [dialog] |
44 | 45 | _default_ = black;lightgray |
-
diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini
index cad1e2807..7f35df0bc 100644
a
|
b
|
|
39 | 39 | header = yellow;blue |
40 | 40 | inputhistory = |
41 | 41 | commandhistory = |
| 42 | shadow = gray;black |
42 | 43 | |
43 | 44 | [dialog] |
44 | 45 | _default_ = black;lightgray |
-
diff --git a/misc/skins/featured-plus.ini b/misc/skins/featured-plus.ini
index be7dde7a6..a0dc07028 100644
a
|
b
|
|
41 | 41 | header = yellow;blue |
42 | 42 | inputhistory = |
43 | 43 | commandhistory = |
| 44 | shadow = gray;black |
44 | 45 | |
45 | 46 | [dialog] |
46 | 47 | _default_ = black;lightgray |
-
diff --git a/misc/skins/featured.ini b/misc/skins/featured.ini
index b37671899..43ce2f293 100644
a
|
b
|
|
41 | 41 | header = yellow;blue |
42 | 42 | inputhistory = |
43 | 43 | commandhistory = |
| 44 | shadow = gray;black |
44 | 45 | |
45 | 46 | [dialog] |
46 | 47 | _default_ = black;lightgray |
-
diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini
index b9b8aa093..3b81867fc 100644
a
|
b
|
|
36 | 36 | header = brightred; |
37 | 37 | inputhistory = |
38 | 38 | commandhistory = |
| 39 | shadow = gray;black |
39 | 40 | |
40 | 41 | [dialog] |
41 | 42 | _default_ = brightcyan;blue |
-
diff --git a/misc/skins/gray-green-purple256.ini b/misc/skins/gray-green-purple256.ini
index 4a15b798c..3ae534cae 100644
a
|
b
|
|
45 | 45 | reverse = |
46 | 46 | commandlinemark = ;main1 |
47 | 47 | header = main2 |
| 48 | shadow = black;gray12 |
48 | 49 | |
49 | 50 | [dialog] |
50 | 51 | _default_ = black;bgdarker |
-
diff --git a/misc/skins/gray-orange-blue256.ini b/misc/skins/gray-orange-blue256.ini
index cddd27b5f..fa491f014 100644
a
|
b
|
|
45 | 45 | reverse = |
46 | 46 | commandlinemark = ;main1 |
47 | 47 | header = main2 |
| 48 | shadow = black;gray12 |
48 | 49 | |
49 | 50 | [dialog] |
50 | 51 | _default_ = black;bgdarker |
-
diff --git a/misc/skins/julia256.ini b/misc/skins/julia256.ini
index bf04dd9e6..a61701cfd 100644
a
|
b
|
|
42 | 42 | header = yellow;color237 |
43 | 43 | inputhistory = |
44 | 44 | commandhistory = |
| 45 | shadow = gray;black |
45 | 46 | |
46 | 47 | [dialog] |
47 | 48 | _default_ = black;lightgray |
-
diff --git a/misc/skins/mc46.ini b/misc/skins/mc46.ini
index 0b1f099d7..f971310ed 100644
a
|
b
|
|
39 | 39 | header = yellow;blue |
40 | 40 | inputhistory = |
41 | 41 | commandhistory = |
| 42 | shadow = gray;black |
42 | 43 | |
43 | 44 | [dialog] |
44 | 45 | _default_ = black;lightgray |
-
diff --git a/misc/skins/modarcon16-defbg.ini b/misc/skins/modarcon16-defbg.ini
index 12391af2f..c004f6363 100644
a
|
b
|
|
81 | 81 | disabled = color8;color7 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color7;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color0;color7 |
-
diff --git a/misc/skins/modarcon16.ini b/misc/skins/modarcon16.ini
index f0fe8d9e8..8cf81ab8b 100644
a
|
b
|
|
81 | 81 | disabled = color8;color7 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color7;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color0;color7 |
-
diff --git a/misc/skins/modarcon16root-defbg.ini b/misc/skins/modarcon16root-defbg.ini
index f00351b36..b74700489 100644
a
|
b
|
|
81 | 81 | disabled = color8;color7 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color7;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color0;color7 |
-
diff --git a/misc/skins/modarcon16root.ini b/misc/skins/modarcon16root.ini
index f76c8d6c9..d9afd5a3d 100644
a
|
b
|
|
81 | 81 | disabled = color8;color7 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color7;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color0;color7 |
-
diff --git a/misc/skins/modarin256-defbg.ini b/misc/skins/modarin256-defbg.ini
index dcc6f265a..f12d33623 100644
a
|
b
|
|
81 | 81 | disabled = color246;color239 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color240;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color252;color239 |
-
diff --git a/misc/skins/modarin256.ini b/misc/skins/modarin256.ini
index fa2bf2e93..8d1872aa7 100644
a
|
b
|
|
81 | 81 | disabled = color246;color239 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color240;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color252;color239 |
-
diff --git a/misc/skins/modarin256root-defbg.ini b/misc/skins/modarin256root-defbg.ini
index dcf7a29b4..48a4e9927 100644
a
|
b
|
|
81 | 81 | disabled = color246;color239 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color240;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color252;color239 |
-
diff --git a/misc/skins/modarin256root.ini b/misc/skins/modarin256root.ini
index 9bb4feefe..0a361ed24 100644
a
|
b
|
|
81 | 81 | disabled = color246;color239 |
82 | 82 | #inputhistory = |
83 | 83 | #commandhistory = |
| 84 | shadow = color240;color0 |
84 | 85 | |
85 | 86 | [dialog] |
86 | 87 | _default_ = color252;color239 |
-
diff --git a/misc/skins/nicedark.ini b/misc/skins/nicedark.ini
index fb2c076a5..0b5ee0107 100644
a
|
b
|
|
39 | 39 | header = lightgray;black |
40 | 40 | inputhistory = |
41 | 41 | commandhistory = |
| 42 | shadow = gray;black |
42 | 43 | |
43 | 44 | [dialog] |
44 | 45 | _default_ = lightgray;black |
-
diff --git a/misc/skins/sand256.ini b/misc/skins/sand256.ini
index f60ad44ab..94b1b77ca 100644
a
|
b
|
|
94 | 94 | reverse = ;rgb452 |
95 | 95 | commandlinemark = white;gray |
96 | 96 | header = red;;italic |
| 97 | shadow = black;rgb221 |
97 | 98 | |
98 | 99 | [dialog] |
99 | 100 | _default_ = black;rgb553 |
-
diff --git a/misc/skins/seasons-autumn16M.ini b/misc/skins/seasons-autumn16M.ini
index 182e2219b..bc8dc65ea 100644
a
|
b
|
|
65 | 65 | DialogFocus = #69880c |
66 | 66 | Input = #b5c400 |
67 | 67 | PaleFg = #555 |
| 68 | ShadowFg = #7f7f55 |
| 69 | ShadowBg = #4c1002 |
68 | 70 | Error = #840000 |
69 | 71 | ErrorFocus = #b00 |
70 | 72 | Top = #ff9909 |
… |
… |
|
106 | 108 | reverse = #000;Bottom |
107 | 109 | commandlinemark = #000;DialogFocus |
108 | 110 | header = HeaderFg |
| 111 | shadow = ShadowFg;ShadowBg |
109 | 112 | |
110 | 113 | [dialog] |
111 | 114 | _default_ = #000;Dialog |
-
diff --git a/misc/skins/seasons-spring16M.ini b/misc/skins/seasons-spring16M.ini
index de5906e2b..2c44a243b 100644
a
|
b
|
|
65 | 65 | DialogFocus = #b3de85 |
66 | 66 | Input = Main |
67 | 67 | PaleFg = #777 |
| 68 | ShadowFg = #000 |
| 69 | ShadowBg = #797f73 |
68 | 70 | Error = #c62b41 |
69 | 71 | ErrorFocus = #e16d7e |
70 | 72 | Top = #f699a6 |
… |
… |
|
106 | 108 | reverse = #000;Bottom |
107 | 109 | commandlinemark = #000;DialogFocus |
108 | 110 | header = HeaderFg |
| 111 | shadow = ShadowFg;ShadowBg |
109 | 112 | |
110 | 113 | [dialog] |
111 | 114 | _default_ = #000;Dialog |
-
diff --git a/misc/skins/seasons-summer16M.ini b/misc/skins/seasons-summer16M.ini
index a8a01caa3..e9c686dc1 100644
a
|
b
|
|
65 | 65 | DialogFocus = #f864f6 |
66 | 66 | Input = #d7ffad |
67 | 67 | PaleFg = #777 |
| 68 | ShadowFg = #000 |
| 69 | ShadowBg = #7f7659 |
68 | 70 | Error = #d40707 |
69 | 71 | ErrorFocus = #db7b7b |
70 | 72 | Top = #46cef3 |
… |
… |
|
106 | 108 | reverse = #000;Bottom |
107 | 109 | commandlinemark = #000;DialogFocus |
108 | 110 | header = HeaderFg |
| 111 | shadow = ShadowFg;ShadowBg |
109 | 112 | |
110 | 113 | [dialog] |
111 | 114 | _default_ = #000;Dialog |
-
diff --git a/misc/skins/seasons-winter16M.ini b/misc/skins/seasons-winter16M.ini
index bebc50c79..2724b2f09 100644
a
|
b
|
|
65 | 65 | DialogFocus = #afbad8 |
66 | 66 | Input = Main |
67 | 67 | PaleFg = #777 |
| 68 | ShadowFg = #000 |
| 69 | ShadowBg = #727176 |
68 | 70 | Error = #3c4766 |
69 | 71 | ErrorFocus = #586896 |
70 | 72 | Top = #6b99d7 |
… |
… |
|
106 | 108 | reverse = #000;Bottom |
107 | 109 | commandlinemark = #000;DialogFocus |
108 | 110 | header = HeaderFg |
| 111 | shadow = ShadowFg;ShadowBg |
109 | 112 | |
110 | 113 | [dialog] |
111 | 114 | _default_ = #000;Dialog |
-
diff --git a/misc/skins/xoria256.ini b/misc/skins/xoria256.ini
index 771f39ca4..d0e6b8a9b 100644
a
|
b
|
|
82 | 82 | #commandhistory = |
83 | 83 | #commandlinemark = black;lightgray |
84 | 84 | |
| 85 | shadow = color239;black |
| 86 | |
85 | 87 | [dialog] |
86 | 88 | _default_ = black;color250 |
87 | 89 | dhotnormal = color88;; |
-
diff --git a/misc/skins/yadt256-defbg.ini b/misc/skins/yadt256-defbg.ini
index 8eec14c14..5de0aef57 100644
a
|
b
|
|
48 | 48 | disabled = color246;color239 |
49 | 49 | #inputhistory = |
50 | 50 | #commandhistory = |
| 51 | shadow = color239;black |
51 | 52 | |
52 | 53 | [dialog] |
53 | 54 | _default_ = color252;color239 |
-
diff --git a/misc/skins/yadt256.ini b/misc/skins/yadt256.ini
index 639576214..8fd2c70b7 100644
a
|
b
|
|
47 | 47 | disabled = color246;color239 |
48 | 48 | #inputhistory = |
49 | 49 | #commandhistory = |
| 50 | shadow = color239;black |
50 | 51 | |
51 | 52 | [dialog] |
52 | 53 | _default_ = color252;color239 |
-
diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
index e6a9abe1a..957f052f1 100644
a
|
b
|
|
42 | 42 | #include "lib/global.h" |
43 | 43 | |
44 | 44 | #include "lib/tty/tty.h" |
| 45 | #include "lib/tty/color.h" /* tty_use_colors() */ |
45 | 46 | #include "lib/tty/key.h" /* XCTRL and ALT macros */ |
46 | 47 | #include "lib/skin.h" /* INPUT_COLOR */ |
47 | 48 | #include "lib/mcconfig.h" /* Load/save user formats */ |
… |
… |
static gchar *current_skin_name; |
119 | 120 | static WListbox *bg_list = NULL; |
120 | 121 | #endif /* ENABLE_BACKGROUND */ |
121 | 122 | |
| 123 | static unsigned long dialog_shadows_id; |
| 124 | |
122 | 125 | /* --------------------------------------------------------------------------------------------- */ |
123 | 126 | /*** file scope functions ************************************************************************/ |
124 | 127 | /* --------------------------------------------------------------------------------------------- */ |
… |
… |
sel_skin_button (WButton * button, int action) |
272 | 275 | |
273 | 276 | /* --------------------------------------------------------------------------------------------- */ |
274 | 277 | |
| 278 | static cb_ret_t |
| 279 | appearance_box_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) |
| 280 | { |
| 281 | switch (msg) |
| 282 | { |
| 283 | case MSG_INIT: |
| 284 | if (!tty_use_colors ()) |
| 285 | { |
| 286 | Widget *shadow; |
| 287 | |
| 288 | shadow = widget_find_by_id (w, dialog_shadows_id); |
| 289 | CHECK (shadow)->state = FALSE; |
| 290 | widget_disable (shadow, TRUE); |
| 291 | } |
| 292 | return MSG_HANDLED; |
| 293 | |
| 294 | case MSG_NOTIFY: |
| 295 | if (sender != NULL && sender->id == dialog_shadows_id) |
| 296 | { |
| 297 | mc_global.tty.dialog_shadows = CHECK (sender)->state; |
| 298 | repaint_screen (); |
| 299 | return MSG_HANDLED; |
| 300 | } |
| 301 | return MSG_NOT_HANDLED; |
| 302 | |
| 303 | default: |
| 304 | return dlg_default_callback (w, sender, msg, parm, data); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | /* --------------------------------------------------------------------------------------------- */ |
| 309 | |
275 | 310 | static cb_ret_t |
276 | 311 | panel_listing_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) |
277 | 312 | { |
… |
… |
configure_box (void) |
590 | 625 | void |
591 | 626 | appearance_box (void) |
592 | 627 | { |
| 628 | gboolean shadows = mc_global.tty.dialog_shadows; |
| 629 | |
593 | 630 | current_skin_name = g_strdup (mc_skin__default.name); |
594 | 631 | skin_names = mc_skin_list (); |
595 | 632 | |
… |
… |
appearance_box (void) |
602 | 639 | QUICK_BUTTON (str_fit_to_term (skin_name_to_label (current_skin_name), 20, J_LEFT_FIT), |
603 | 640 | B_USER, sel_skin_button, NULL), |
604 | 641 | QUICK_STOP_COLUMNS, |
| 642 | QUICK_CHECKBOX (N_("Dialog &shadows"), &mc_global.tty.dialog_shadows, &dialog_shadows_id), |
605 | 643 | QUICK_BUTTONS_OK_CANCEL, |
606 | 644 | QUICK_END |
607 | 645 | /* *INDENT-ON* */ |
… |
… |
appearance_box (void) |
610 | 648 | quick_dialog_t qdlg = { |
611 | 649 | -1, -1, 54, |
612 | 650 | N_("Appearance"), "[Appearance]", |
613 | | quick_widgets, dlg_default_callback, NULL |
| 651 | quick_widgets, appearance_box_callback, NULL |
614 | 652 | }; |
615 | 653 | |
616 | 654 | if (quick_dialog (&qdlg) == B_ENTER) |
617 | 655 | mc_config_set_string (mc_global.main_config, CONFIG_APP_SECTION, "skin", |
618 | 656 | current_skin_name); |
619 | 657 | else |
| 658 | { |
620 | 659 | skin_apply (NULL); |
| 660 | mc_global.tty.dialog_shadows = shadows; |
| 661 | } |
621 | 662 | } |
622 | 663 | |
623 | 664 | g_free (current_skin_name); |
-
diff --git a/src/setup.c b/src/setup.c
index 37618a9cd..d7cb70919 100644
a
|
b
|
static const struct |
360 | 360 | #endif /* USE_INTERNAL_EDIT */ |
361 | 361 | { "editor_ask_filename_before_edit", &editor_ask_filename_before_edit }, |
362 | 362 | { "nice_rotating_dash", &nice_rotating_dash }, |
| 363 | { "dialog_shadows", &mc_global.tty.dialog_shadows }, |
363 | 364 | { "mcview_remember_file_position", &mcview_remember_file_position }, |
364 | 365 | { "auto_fill_mkdir_name", &auto_fill_mkdir_name }, |
365 | 366 | { "copymove_persistent_attr", ©move_persistent_attr }, |
-
diff --git a/src/setup.h b/src/setup.h
index 7de0fe393..5a430a6c8 100644
a
|
b
|
struct mc_fhl_struct; |
73 | 73 | |
74 | 74 | /*** global variables defined in .c file *********************************************************/ |
75 | 75 | |
76 | | /* global paremeters */ |
| 76 | /* global parameters */ |
77 | 77 | extern char *global_profile_name; |
78 | 78 | extern gboolean confirm_delete; |
79 | 79 | extern gboolean confirm_directory_hotlist_delete; |