Ticket #4102: dialog-shadow-2.patch

File dialog-shadow-2.patch, 29.9 KB (added by andrew_b, 4 years ago)
  • doc/man/mc.1.in

    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, 
    21132113directory hotlist entries deletion and history cleanup. 
    21142114.\"NODE "    Appearance" 
    21152115.SH "    Appearance" 
    2116 In this dialog you can select the skin to be used. 
     2116In this dialog you can select the skin to be used and enable dialog and menu shadows. 
    21172117.PP 
    21182118See the 
    21192119.\"LINK2" 
    21202120Skins 
    21212121.\"Skins" 
    21222122section for technical details about the skin definition files. 
     2123.PP 
     2124.I Dialog shadows. 
     2125If this option is enabled, all dialogs and menus will have a "shadow" on the right 
     2126and bottom side. If disabled, dialogs and menus will be just flat. 
    21232127.\"NODE "    Display bits" 
    21242128.SH "    Display bits" 
    21252129This is used to configure the range of visible characters on the 
  • lib/global.c

    diff --git a/lib/global.c b/lib/global.c
    index 137bfbdd3..95136979f 100644
    a b mc_global_t mc_global = { 
    8585    .tty = 
    8686    { 
    8787        .skin = NULL, 
     88        .dialog_shadows = TRUE, 
    8889        .setup_color_string = NULL, 
    8990        .term_color_string = NULL, 
    9091        .color_terminal_string = NULL, 
  • lib/global.h

    diff --git a/lib/global.h b/lib/global.h
    index 846c724c6..e96753419 100644
    a b typedef struct 
    230230    { 
    231231        /* Use the specified skin */ 
    232232        char *skin; 
     233        /* Dialog and menu window have a shadow (on the right and bottom side) */ 
     234        gboolean dialog_shadows; 
    233235 
    234236        char *setup_color_string; 
    235237        char *term_color_string; 
  • lib/skin.h

    diff --git a/lib/skin.h b/lib/skin.h
    index 747a504ec..155a8db9c 100644
    a b  
    2222#define REVERSE_COLOR             mc_skin_color__cache[6] 
    2323#define COMMAND_MARK_COLOR        mc_skin_color__cache[7] 
    2424#define HEADER_COLOR              mc_skin_color__cache[8] 
     25#define SHADOW_COLOR              mc_skin_color__cache[9] 
    2526 
    2627/* 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] 
    3233 
    3334/* 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] 
    3940 
    4041/* 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] 
    4647 
    4748/* 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] 
    5354 
    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] 
    5657 
    57 #define STATUSBAR_COLOR           mc_skin_color__cache[31] 
     58#define STATUSBAR_COLOR           mc_skin_color__cache[32] 
    5859 
    5960/* 
    6061 * This should be selectable independently. Default has to be black background 
    6162 * foreground does not matter at all. 
    6263 */ 
    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] 
    8283 
    8384/* 
    8485 * editor colors - only 4 for normal, search->found, select, and whitespace 
    8586 * respectively 
    8687 * Last is defined to view color. 
    8788 */ 
    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] 
    9798/* 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] 
    101102 
    102103/* 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 
    111112 
    112113/*** enums ***************************************************************************************/ 
    113114 
  • lib/skin/colors.c

    diff --git a/lib/skin/colors.c b/lib/skin/colors.c
    index b8d944a41..27e18bdda 100644
    a b mc_skin_color_cache_init (void) 
    249249    REVERSE_COLOR = mc_skin_color_get ("core", "reverse"); 
    250250    HEADER_COLOR = mc_skin_color_get ("core", "header"); 
    251251    COMMAND_MARK_COLOR = mc_skin_color_get ("core", "commandlinemark"); 
     252    SHADOW_COLOR = mc_skin_color_get ("core", "shadow"); 
    252253 
    253254    COLOR_NORMAL = mc_skin_color_get ("dialog", "_default_"); 
    254255    COLOR_FOCUS = mc_skin_color_get ("dialog", "dfocus"); 
  • lib/tty/tty-internal.h

    diff --git a/lib/tty/tty-internal.h b/lib/tty/tty-internal.h
    index 662b0bcaf..69b8ff963 100644
    a b  
    1717#define NULL_VALUE 255 
    1818#endif 
    1919 
     20#define yx_in_screen(y,x) \ 
     21        (y >= 0 && y < LINES && x >= 0 && x < COLS) 
     22 
    2023/*** enums ***************************************************************************************/ 
    2124 
    2225/*** structures declarations (and typedefs of structures)*****************************************/ 
    char *mc_tty_normalize_from_utf8 (const char *); 
    4245void tty_init_xterm_support (gboolean is_xterm); 
    4346int tty_lowlevel_getch (void); 
    4447 
     48void tty_colorize_area (int y, int x, int rows, int cols, int color); 
     49 
    4550/*** inline functions ****************************************************************************/ 
    4651 
    4752#endif /* MC_TTY_INTERNAL_H */ 
  • lib/tty/tty-ncurses.c

    diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
    index 4383d1e74..9689ff292 100644
    a b  
    4848 
    4949#include "tty-internal.h"       /* mc_tty_normalize_from_utf8() */ 
    5050#include "tty.h" 
     51#include "color.h"              /* tty_setcolor */ 
    5152#include "color-internal.h" 
    5253#include "key.h" 
    5354#include "mouse.h" 
     
    7071#define CTRL(x) ((x) & 0x1f) 
    7172#endif 
    7273 
    73 #define yx_in_screen(y, x) \ 
    74     (y >= 0 && y < LINES && x >= 0 && x < COLS) 
    75  
    7674/*** global variables ****************************************************************************/ 
    7775 
    7876/*** file scope type declarations ****************************************************************/ 
    tty_fill_region (int y, int x, int rows, int cols, unsigned char ch) 
    533531 
    534532/* --------------------------------------------------------------------------------------------- */ 
    535533 
     534void 
     535tty_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 
    536566void 
    537567tty_set_alt_charset (gboolean alt_charset) 
    538568{ 
  • lib/tty/tty-slang.c

    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) 
    622622 
    623623/* --------------------------------------------------------------------------------------------- */ 
    624624 
     625void 
     626tty_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 
    625634void 
    626635tty_set_alt_charset (gboolean alt_charset) 
    627636{ 
  • lib/tty/tty.c

    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) 
    264264 
    265265/* --------------------------------------------------------------------------------------------- */ 
    266266 
     267void 
     268tty_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 
    267278char * 
    268279mc_tty_normalize_from_utf8 (const char *str) 
    269280{ 
  • lib/tty/tty.h

    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); 
    126126extern void tty_draw_hline (int y, int x, int ch, int len); 
    127127extern void tty_draw_vline (int y, int x, int ch, int len); 
    128128extern void tty_draw_box (int y, int x, int rows, int cols, gboolean single); 
     129extern void tty_draw_box_shadow (int y, int x, int rows, int cols, int shadow_color); 
    129130extern void tty_fill_region (int y, int x, int rows, int cols, unsigned char ch); 
    130131 
    131132extern int tty_resize (int fd); 
  • lib/widget/frame.c

    diff --git a/lib/widget/frame.c b/lib/widget/frame.c
    index 1f4f14d8a..1b02e9258 100644
    a b frame_draw (const WFrame * f) 
    7676 
    7777    colors = widget_get_colors (w); 
    7878 
     79    if (mc_global.tty.dialog_shadows) 
     80        tty_draw_box_shadow (w->y, w->x, w->lines, w->cols, SHADOW_COLOR); 
     81 
    7982    tty_setcolor (colors[FRAME_COLOR_NORMAL]); 
    8083    tty_fill_region (w->y, w->x, w->lines, w->cols, ' '); 
    8184    tty_draw_box (w->y + d, w->x + d, w->lines - 2 * d, w->cols - 2 * d, f->single); 
  • lib/widget/menu.c

    diff --git a/lib/widget/menu.c b/lib/widget/menu.c
    index ca2ff472a..df337a357 100644
    a b menubar_draw_drop (const WMenuBar * menubar) 
    187187    if (column + menu->max_entry_len + 5 > (gsize) w->cols) 
    188188        column = w->cols - menu->max_entry_len - 5; 
    189189 
     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 
    190194    tty_setcolor (MENU_ENTRY_COLOR); 
    191195    tty_draw_box (w->y + 1, w->x + column, count + 2, menu->max_entry_len + 5, FALSE); 
    192196 
  • misc/skins/dark.ini

    diff --git a/misc/skins/dark.ini b/misc/skins/dark.ini
    index 58d6f8351..0cfeb8ecf 100644
    a b  
    3939    header = yellow;black 
    4040    inputhistory = 
    4141    commandhistory = 
     42    shadow = gray;black 
    4243 
    4344[dialog] 
    4445    _default_ = brightcyan;blue 
  • misc/skins/darkfar.ini

    diff --git a/misc/skins/darkfar.ini b/misc/skins/darkfar.ini
    index e0e1a5879..c6dcf68f2 100644
    a b  
    3939    header = yellow;black 
    4040    inputhistory = 
    4141    commandhistory = 
     42    shadow = gray;black 
    4243 
    4344[dialog] 
    4445    _default_ = brightcyan;blue 
  • misc/skins/default.ini

    diff --git a/misc/skins/default.ini b/misc/skins/default.ini
    index afc060ade..145eb998b 100644
    a b  
    3939    header = yellow;blue 
    4040    inputhistory = 
    4141    commandhistory = 
     42    shadow = gray;black 
    4243 
    4344[dialog] 
    4445    _default_ = black;lightgray 
  • misc/skins/double-lines.ini

    diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini
    index cad1e2807..7f35df0bc 100644
    a b  
    3939    header = yellow;blue 
    4040    inputhistory = 
    4141    commandhistory = 
     42    shadow = gray;black 
    4243 
    4344[dialog] 
    4445    _default_ = black;lightgray 
  • misc/skins/featured-plus.ini

    diff --git a/misc/skins/featured-plus.ini b/misc/skins/featured-plus.ini
    index be7dde7a6..a0dc07028 100644
    a b  
    4141    header = yellow;blue 
    4242    inputhistory = 
    4343    commandhistory = 
     44    shadow = gray;black 
    4445 
    4546[dialog] 
    4647    _default_ = black;lightgray 
  • misc/skins/featured.ini

    diff --git a/misc/skins/featured.ini b/misc/skins/featured.ini
    index b37671899..43ce2f293 100644
    a b  
    4141    header = yellow;blue 
    4242    inputhistory = 
    4343    commandhistory = 
     44    shadow = gray;black 
    4445 
    4546[dialog] 
    4647    _default_ = black;lightgray 
  • misc/skins/gotar.ini

    diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini
    index b9b8aa093..3b81867fc 100644
    a b  
    3636    header = brightred; 
    3737    inputhistory = 
    3838    commandhistory = 
     39    shadow = gray;black 
    3940 
    4041[dialog] 
    4142    _default_ = brightcyan;blue 
  • misc/skins/gray-green-purple256.ini

    diff --git a/misc/skins/gray-green-purple256.ini b/misc/skins/gray-green-purple256.ini
    index 4a15b798c..3ae534cae 100644
    a b  
    4545    reverse = 
    4646    commandlinemark = ;main1 
    4747    header = main2 
     48    shadow = black;gray12 
    4849 
    4950[dialog] 
    5051    _default_ = black;bgdarker 
  • misc/skins/gray-orange-blue256.ini

    diff --git a/misc/skins/gray-orange-blue256.ini b/misc/skins/gray-orange-blue256.ini
    index cddd27b5f..fa491f014 100644
    a b  
    4545    reverse = 
    4646    commandlinemark = ;main1 
    4747    header = main2 
     48    shadow = black;gray12 
    4849 
    4950[dialog] 
    5051    _default_ = black;bgdarker 
  • misc/skins/julia256.ini

    diff --git a/misc/skins/julia256.ini b/misc/skins/julia256.ini
    index bf04dd9e6..a61701cfd 100644
    a b  
    4242    header = yellow;color237 
    4343    inputhistory = 
    4444    commandhistory = 
     45    shadow = gray;black 
    4546 
    4647[dialog] 
    4748    _default_ = black;lightgray 
  • misc/skins/mc46.ini

    diff --git a/misc/skins/mc46.ini b/misc/skins/mc46.ini
    index 0b1f099d7..f971310ed 100644
    a b  
    3939    header = yellow;blue 
    4040    inputhistory = 
    4141    commandhistory = 
     42    shadow = gray;black 
    4243 
    4344[dialog] 
    4445    _default_ = black;lightgray 
  • misc/skins/modarcon16-defbg.ini

    diff --git a/misc/skins/modarcon16-defbg.ini b/misc/skins/modarcon16-defbg.ini
    index 12391af2f..c004f6363 100644
    a b  
    8181    disabled = color8;color7 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color7;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color0;color7 
  • misc/skins/modarcon16.ini

    diff --git a/misc/skins/modarcon16.ini b/misc/skins/modarcon16.ini
    index f0fe8d9e8..8cf81ab8b 100644
    a b  
    8181    disabled = color8;color7 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color7;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color0;color7 
  • misc/skins/modarcon16root-defbg.ini

    diff --git a/misc/skins/modarcon16root-defbg.ini b/misc/skins/modarcon16root-defbg.ini
    index f00351b36..b74700489 100644
    a b  
    8181    disabled = color8;color7 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color7;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color0;color7 
  • misc/skins/modarcon16root.ini

    diff --git a/misc/skins/modarcon16root.ini b/misc/skins/modarcon16root.ini
    index f76c8d6c9..d9afd5a3d 100644
    a b  
    8181    disabled = color8;color7 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color7;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color0;color7 
  • misc/skins/modarin256-defbg.ini

    diff --git a/misc/skins/modarin256-defbg.ini b/misc/skins/modarin256-defbg.ini
    index dcc6f265a..f12d33623 100644
    a b  
    8181    disabled = color246;color239 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color240;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color252;color239 
  • misc/skins/modarin256.ini

    diff --git a/misc/skins/modarin256.ini b/misc/skins/modarin256.ini
    index fa2bf2e93..8d1872aa7 100644
    a b  
    8181    disabled = color246;color239 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color240;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color252;color239 
  • misc/skins/modarin256root-defbg.ini

    diff --git a/misc/skins/modarin256root-defbg.ini b/misc/skins/modarin256root-defbg.ini
    index dcf7a29b4..48a4e9927 100644
    a b  
    8181    disabled = color246;color239 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color240;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color252;color239 
  • misc/skins/modarin256root.ini

    diff --git a/misc/skins/modarin256root.ini b/misc/skins/modarin256root.ini
    index 9bb4feefe..0a361ed24 100644
    a b  
    8181    disabled = color246;color239 
    8282    #inputhistory = 
    8383    #commandhistory = 
     84    shadow = color240;color0 
    8485 
    8586[dialog] 
    8687    _default_ = color252;color239 
  • misc/skins/nicedark.ini

    diff --git a/misc/skins/nicedark.ini b/misc/skins/nicedark.ini
    index fb2c076a5..0b5ee0107 100644
    a b  
    3939    header = lightgray;black 
    4040    inputhistory = 
    4141    commandhistory = 
     42    shadow = gray;black 
    4243 
    4344[dialog] 
    4445    _default_ = lightgray;black 
  • misc/skins/sand256.ini

    diff --git a/misc/skins/sand256.ini b/misc/skins/sand256.ini
    index f60ad44ab..94b1b77ca 100644
    a b  
    9494    reverse = ;rgb452 
    9595    commandlinemark = white;gray 
    9696    header = red;;italic 
     97    shadow = black;rgb221 
    9798 
    9899[dialog] 
    99100    _default_ = black;rgb553 
  • misc/skins/seasons-autumn16M.ini

    diff --git a/misc/skins/seasons-autumn16M.ini b/misc/skins/seasons-autumn16M.ini
    index 182e2219b..bc8dc65ea 100644
    a b  
    6565    DialogFocus = #69880c 
    6666    Input = #b5c400 
    6767    PaleFg = #555 
     68    ShadowFg = #7f7f55 
     69    ShadowBg = #4c1002 
    6870    Error = #840000 
    6971    ErrorFocus = #b00 
    7072    Top = #ff9909 
     
    106108    reverse = #000;Bottom 
    107109    commandlinemark = #000;DialogFocus 
    108110    header = HeaderFg 
     111    shadow = ShadowFg;ShadowBg 
    109112 
    110113[dialog] 
    111114    _default_ = #000;Dialog 
  • misc/skins/seasons-spring16M.ini

    diff --git a/misc/skins/seasons-spring16M.ini b/misc/skins/seasons-spring16M.ini
    index de5906e2b..2c44a243b 100644
    a b  
    6565    DialogFocus = #b3de85 
    6666    Input = Main 
    6767    PaleFg = #777 
     68    ShadowFg = #000 
     69    ShadowBg = #797f73 
    6870    Error = #c62b41 
    6971    ErrorFocus = #e16d7e 
    7072    Top = #f699a6 
     
    106108    reverse = #000;Bottom 
    107109    commandlinemark = #000;DialogFocus 
    108110    header = HeaderFg 
     111    shadow = ShadowFg;ShadowBg 
    109112 
    110113[dialog] 
    111114    _default_ = #000;Dialog 
  • misc/skins/seasons-summer16M.ini

    diff --git a/misc/skins/seasons-summer16M.ini b/misc/skins/seasons-summer16M.ini
    index a8a01caa3..e9c686dc1 100644
    a b  
    6565    DialogFocus = #f864f6 
    6666    Input = #d7ffad 
    6767    PaleFg = #777 
     68    ShadowFg = #000 
     69    ShadowBg = #7f7659 
    6870    Error = #d40707 
    6971    ErrorFocus = #db7b7b 
    7072    Top = #46cef3 
     
    106108    reverse = #000;Bottom 
    107109    commandlinemark = #000;DialogFocus 
    108110    header = HeaderFg 
     111    shadow = ShadowFg;ShadowBg 
    109112 
    110113[dialog] 
    111114    _default_ = #000;Dialog 
  • misc/skins/seasons-winter16M.ini

    diff --git a/misc/skins/seasons-winter16M.ini b/misc/skins/seasons-winter16M.ini
    index bebc50c79..2724b2f09 100644
    a b  
    6565    DialogFocus = #afbad8 
    6666    Input = Main 
    6767    PaleFg = #777 
     68    ShadowFg = #000 
     69    ShadowBg = #727176 
    6870    Error = #3c4766 
    6971    ErrorFocus = #586896 
    7072    Top = #6b99d7 
     
    106108    reverse = #000;Bottom 
    107109    commandlinemark = #000;DialogFocus 
    108110    header = HeaderFg 
     111    shadow = ShadowFg;ShadowBg 
    109112 
    110113[dialog] 
    111114    _default_ = #000;Dialog 
  • misc/skins/xoria256.ini

    diff --git a/misc/skins/xoria256.ini b/misc/skins/xoria256.ini
    index 771f39ca4..d0e6b8a9b 100644
    a b  
    8282    #commandhistory = 
    8383    #commandlinemark = black;lightgray 
    8484 
     85    shadow = color239;black 
     86 
    8587[dialog] 
    8688    _default_ = black;color250 
    8789    dhotnormal = color88;; 
  • misc/skins/yadt256-defbg.ini

    diff --git a/misc/skins/yadt256-defbg.ini b/misc/skins/yadt256-defbg.ini
    index 8eec14c14..5de0aef57 100644
    a b  
    4848    disabled = color246;color239 
    4949    #inputhistory = 
    5050    #commandhistory = 
     51    shadow = color239;black 
    5152 
    5253[dialog] 
    5354    _default_ = color252;color239 
  • misc/skins/yadt256.ini

    diff --git a/misc/skins/yadt256.ini b/misc/skins/yadt256.ini
    index 639576214..8fd2c70b7 100644
    a b  
    4747    disabled = color246;color239 
    4848    #inputhistory = 
    4949    #commandhistory = 
     50    shadow = color239;black 
    5051 
    5152[dialog] 
    5253    _default_ = color252;color239 
  • src/filemanager/boxes.c

    diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
    index e6a9abe1a..957f052f1 100644
    a b  
    4242#include "lib/global.h" 
    4343 
    4444#include "lib/tty/tty.h" 
     45#include "lib/tty/color.h"      /* tty_use_colors() */ 
    4546#include "lib/tty/key.h"        /* XCTRL and ALT macros  */ 
    4647#include "lib/skin.h"           /* INPUT_COLOR */ 
    4748#include "lib/mcconfig.h"       /* Load/save user formats */ 
    static gchar *current_skin_name; 
    119120static WListbox *bg_list = NULL; 
    120121#endif /* ENABLE_BACKGROUND */ 
    121122 
     123static unsigned long dialog_shadows_id; 
     124 
    122125/* --------------------------------------------------------------------------------------------- */ 
    123126/*** file scope functions ************************************************************************/ 
    124127/* --------------------------------------------------------------------------------------------- */ 
    sel_skin_button (WButton * button, int action) 
    272275 
    273276/* --------------------------------------------------------------------------------------------- */ 
    274277 
     278static cb_ret_t 
     279appearance_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 
    275310static cb_ret_t 
    276311panel_listing_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
    277312{ 
    configure_box (void) 
    590625void 
    591626appearance_box (void) 
    592627{ 
     628    gboolean shadows = mc_global.tty.dialog_shadows; 
     629 
    593630    current_skin_name = g_strdup (mc_skin__default.name); 
    594631    skin_names = mc_skin_list (); 
    595632 
    appearance_box (void) 
    602639                QUICK_BUTTON (str_fit_to_term (skin_name_to_label (current_skin_name), 20, J_LEFT_FIT), 
    603640                              B_USER, sel_skin_button, NULL), 
    604641            QUICK_STOP_COLUMNS, 
     642            QUICK_CHECKBOX (N_("Dialog &shadows"), &mc_global.tty.dialog_shadows, &dialog_shadows_id), 
    605643            QUICK_BUTTONS_OK_CANCEL, 
    606644            QUICK_END 
    607645            /* *INDENT-ON* */ 
    appearance_box (void) 
    610648        quick_dialog_t qdlg = { 
    611649            -1, -1, 54, 
    612650            N_("Appearance"), "[Appearance]", 
    613             quick_widgets, dlg_default_callback, NULL 
     651            quick_widgets, appearance_box_callback, NULL 
    614652        }; 
    615653 
    616654        if (quick_dialog (&qdlg) == B_ENTER) 
    617655            mc_config_set_string (mc_global.main_config, CONFIG_APP_SECTION, "skin", 
    618656                                  current_skin_name); 
    619657        else 
     658        { 
    620659            skin_apply (NULL); 
     660            mc_global.tty.dialog_shadows = shadows; 
     661        } 
    621662    } 
    622663 
    623664    g_free (current_skin_name); 
  • src/setup.c

    diff --git a/src/setup.c b/src/setup.c
    index 37618a9cd..d7cb70919 100644
    a b static const struct 
    360360#endif /* USE_INTERNAL_EDIT */ 
    361361    { "editor_ask_filename_before_edit", &editor_ask_filename_before_edit }, 
    362362    { "nice_rotating_dash", &nice_rotating_dash }, 
     363    { "dialog_shadows", &mc_global.tty.dialog_shadows }, 
    363364    { "mcview_remember_file_position", &mcview_remember_file_position }, 
    364365    { "auto_fill_mkdir_name", &auto_fill_mkdir_name }, 
    365366    { "copymove_persistent_attr", &copymove_persistent_attr }, 
  • src/setup.h

    diff --git a/src/setup.h b/src/setup.h
    index 7de0fe393..5a430a6c8 100644
    a b struct mc_fhl_struct; 
    7373 
    7474/*** global variables defined in .c file *********************************************************/ 
    7575 
    76 /* global paremeters */ 
     76/* global parameters */ 
    7777extern char *global_profile_name; 
    7878extern gboolean confirm_delete; 
    7979extern gboolean confirm_directory_hotlist_delete;