Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 64 additions & 62 deletions lib/skin.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,90 +25,92 @@
#define SHADOW_COLOR mc_skin_color__cache[9]

/* Dialog colors */
#define COLOR_NORMAL mc_skin_color__cache[10]
#define COLOR_FOCUS mc_skin_color__cache[11]
#define COLOR_HOT_NORMAL mc_skin_color__cache[12]
#define COLOR_HOT_FOCUS mc_skin_color__cache[13]
#define COLOR_TITLE mc_skin_color__cache[14]
#define COLOR_NORMAL mc_skin_color__cache[10]
#define COLOR_FOCUS mc_skin_color__cache[11]
#define COLOR_HOT_NORMAL mc_skin_color__cache[12]
#define COLOR_HOT_FOCUS mc_skin_color__cache[13]
#define COLOR_SELECTED_NORMAL mc_skin_color__cache[14]
#define COLOR_SELECTED_FOCUS mc_skin_color__cache[15]
#define COLOR_TITLE mc_skin_color__cache[16]

/* Error dialog colors */
#define ERROR_COLOR mc_skin_color__cache[15]
#define ERROR_FOCUS mc_skin_color__cache[16]
#define ERROR_HOT_NORMAL mc_skin_color__cache[17]
#define ERROR_HOT_FOCUS mc_skin_color__cache[18]
#define ERROR_TITLE mc_skin_color__cache[19]
#define ERROR_COLOR mc_skin_color__cache[17]
#define ERROR_FOCUS mc_skin_color__cache[18]
#define ERROR_HOT_NORMAL mc_skin_color__cache[19]
#define ERROR_HOT_FOCUS mc_skin_color__cache[20]
#define ERROR_TITLE mc_skin_color__cache[21]

/* Menu colors */
#define MENU_ENTRY_COLOR mc_skin_color__cache[20]
#define MENU_SELECTED_COLOR mc_skin_color__cache[21]
#define MENU_HOT_COLOR mc_skin_color__cache[22]
#define MENU_HOTSEL_COLOR mc_skin_color__cache[23]
#define MENU_INACTIVE_COLOR mc_skin_color__cache[24]
#define MENU_ENTRY_COLOR mc_skin_color__cache[22]
#define MENU_SELECTED_COLOR mc_skin_color__cache[23]
#define MENU_HOT_COLOR mc_skin_color__cache[24]
#define MENU_HOTSEL_COLOR mc_skin_color__cache[25]
#define MENU_INACTIVE_COLOR mc_skin_color__cache[26]

/* Popup menu colors */
#define PMENU_ENTRY_COLOR mc_skin_color__cache[25]
#define PMENU_SELECTED_COLOR mc_skin_color__cache[26]
#define PMENU_HOT_COLOR mc_skin_color__cache[27] // unused: not implemented yet
#define PMENU_HOTSEL_COLOR mc_skin_color__cache[28] // unused: not implemented yet
#define PMENU_TITLE_COLOR mc_skin_color__cache[29]
#define PMENU_ENTRY_COLOR mc_skin_color__cache[27]
#define PMENU_SELECTED_COLOR mc_skin_color__cache[28]
#define PMENU_HOT_COLOR mc_skin_color__cache[29] // unused: not implemented yet
#define PMENU_HOTSEL_COLOR mc_skin_color__cache[30] // unused: not implemented yet
#define PMENU_TITLE_COLOR mc_skin_color__cache[31]

#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[30]
#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[31]
#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[32]
#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[33]

#define STATUSBAR_COLOR mc_skin_color__cache[32]
#define STATUSBAR_COLOR mc_skin_color__cache[34]

/*
* This should be selectable independently. Default has to be black background
* foreground does not matter at all.
*/
#define GAUGE_COLOR mc_skin_color__cache[33]
#define INPUT_COLOR mc_skin_color__cache[34]
#define INPUT_UNCHANGED_COLOR mc_skin_color__cache[35]
#define INPUT_MARK_COLOR mc_skin_color__cache[36]
#define INPUT_HISTORY_COLOR mc_skin_color__cache[37]
#define COMMAND_HISTORY_COLOR mc_skin_color__cache[38]

#define HELP_NORMAL_COLOR mc_skin_color__cache[39]
#define HELP_ITALIC_COLOR mc_skin_color__cache[40]
#define HELP_BOLD_COLOR mc_skin_color__cache[41]
#define HELP_LINK_COLOR mc_skin_color__cache[42]
#define HELP_SLINK_COLOR mc_skin_color__cache[43]
#define HELP_TITLE_COLOR mc_skin_color__cache[44]

#define VIEW_NORMAL_COLOR mc_skin_color__cache[45]
#define VIEW_BOLD_COLOR mc_skin_color__cache[46]
#define VIEW_UNDERLINED_COLOR mc_skin_color__cache[47]
#define VIEW_SELECTED_COLOR mc_skin_color__cache[48]
#define GAUGE_COLOR mc_skin_color__cache[35]
#define INPUT_COLOR mc_skin_color__cache[36]
#define INPUT_UNCHANGED_COLOR mc_skin_color__cache[37]
#define INPUT_MARK_COLOR mc_skin_color__cache[38]
#define INPUT_HISTORY_COLOR mc_skin_color__cache[39]
#define COMMAND_HISTORY_COLOR mc_skin_color__cache[40]

#define HELP_NORMAL_COLOR mc_skin_color__cache[41]
#define HELP_ITALIC_COLOR mc_skin_color__cache[42]
#define HELP_BOLD_COLOR mc_skin_color__cache[43]
#define HELP_LINK_COLOR mc_skin_color__cache[44]
#define HELP_SLINK_COLOR mc_skin_color__cache[45]
#define HELP_TITLE_COLOR mc_skin_color__cache[46]

#define VIEW_NORMAL_COLOR mc_skin_color__cache[47]
#define VIEW_BOLD_COLOR mc_skin_color__cache[48]
#define VIEW_UNDERLINED_COLOR mc_skin_color__cache[49]
#define VIEW_SELECTED_COLOR mc_skin_color__cache[50]

/*
* 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[49]
#define EDITOR_NONPRINTABLE_COLOR mc_skin_color__cache[50]
#define EDITOR_BOLD_COLOR mc_skin_color__cache[51]
#define EDITOR_MARKED_COLOR mc_skin_color__cache[52]
#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[53]
#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[54]
#define EDITOR_BACKGROUND mc_skin_color__cache[55]
#define EDITOR_FRAME mc_skin_color__cache[56]
#define EDITOR_FRAME_ACTIVE mc_skin_color__cache[57]
#define EDITOR_FRAME_DRAG mc_skin_color__cache[58]
#define EDITOR_NORMAL_COLOR mc_skin_color__cache[51]
#define EDITOR_NONPRINTABLE_COLOR mc_skin_color__cache[52]
#define EDITOR_BOLD_COLOR mc_skin_color__cache[53]
#define EDITOR_MARKED_COLOR mc_skin_color__cache[54]
#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[55]
#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[56]
#define EDITOR_BACKGROUND mc_skin_color__cache[57]
#define EDITOR_FRAME mc_skin_color__cache[58]
#define EDITOR_FRAME_ACTIVE mc_skin_color__cache[59]
#define EDITOR_FRAME_DRAG mc_skin_color__cache[60]
/* color of left 8 char status per line */
#define LINE_STATE_COLOR mc_skin_color__cache[59]
#define BOOK_MARK_COLOR mc_skin_color__cache[60]
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[61]
#define LINE_STATE_COLOR mc_skin_color__cache[61]
#define BOOK_MARK_COLOR mc_skin_color__cache[62]
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[63]

/* Diff colors */
#define DFF_ADD_COLOR mc_skin_color__cache[62]
#define DFF_CHG_COLOR mc_skin_color__cache[63]
#define DFF_CHH_COLOR mc_skin_color__cache[64]
#define DFF_CHD_COLOR mc_skin_color__cache[65]
#define DFF_DEL_COLOR mc_skin_color__cache[66]
#define DFF_ERROR_COLOR mc_skin_color__cache[67]

#define MC_SKIN_COLOR_CACHE_COUNT 68
#define DFF_ADD_COLOR mc_skin_color__cache[64]
#define DFF_CHG_COLOR mc_skin_color__cache[65]
#define DFF_CHH_COLOR mc_skin_color__cache[66]
#define DFF_CHD_COLOR mc_skin_color__cache[67]
#define DFF_DEL_COLOR mc_skin_color__cache[68]
#define DFF_ERROR_COLOR mc_skin_color__cache[69]

#define MC_SKIN_COLOR_CACHE_COUNT 70

/*** enums ***************************************************************************************/

Expand Down
2 changes: 2 additions & 0 deletions lib/skin/colors.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ mc_skin_color_cache_init (void)
COLOR_FOCUS = mc_skin_color_get ("dialog", "dfocus");
COLOR_HOT_NORMAL = mc_skin_color_get ("dialog", "dhotnormal");
COLOR_HOT_FOCUS = mc_skin_color_get ("dialog", "dhotfocus");
COLOR_SELECTED_NORMAL = mc_skin_color_get ("dialog", "dselnormal");
COLOR_SELECTED_FOCUS = mc_skin_color_get ("dialog", "dselfocus");
COLOR_TITLE = mc_skin_color_get ("dialog", "dtitle");

ERROR_COLOR = mc_skin_color_get ("error", "_default_");
Expand Down
6 changes: 6 additions & 0 deletions lib/widget/dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,18 +456,24 @@ dlg_set_default_colors (void)
dialog_colors[DLG_COLOR_FOCUS] = COLOR_FOCUS;
dialog_colors[DLG_COLOR_HOT_NORMAL] = COLOR_HOT_NORMAL;
dialog_colors[DLG_COLOR_HOT_FOCUS] = COLOR_HOT_FOCUS;
dialog_colors[DLG_COLOR_SELECTED_NORMAL] = COLOR_SELECTED_NORMAL;
dialog_colors[DLG_COLOR_SELECTED_FOCUS] = COLOR_SELECTED_FOCUS;
dialog_colors[DLG_COLOR_TITLE] = COLOR_TITLE;

alarm_colors[DLG_COLOR_NORMAL] = ERROR_COLOR;
alarm_colors[DLG_COLOR_FOCUS] = ERROR_FOCUS;
alarm_colors[DLG_COLOR_HOT_NORMAL] = ERROR_HOT_NORMAL;
alarm_colors[DLG_COLOR_HOT_FOCUS] = ERROR_HOT_FOCUS;
alarm_colors[DLG_COLOR_SELECTED_NORMAL] = ERROR_HOT_FOCUS; // unused
alarm_colors[DLG_COLOR_SELECTED_FOCUS] = ERROR_FOCUS; // unused
alarm_colors[DLG_COLOR_TITLE] = ERROR_TITLE;

listbox_colors[DLG_COLOR_NORMAL] = PMENU_ENTRY_COLOR;
listbox_colors[DLG_COLOR_FOCUS] = PMENU_SELECTED_COLOR;
listbox_colors[DLG_COLOR_HOT_NORMAL] = PMENU_ENTRY_COLOR;
listbox_colors[DLG_COLOR_HOT_FOCUS] = PMENU_SELECTED_COLOR;
listbox_colors[DLG_COLOR_SELECTED_NORMAL] = PMENU_SELECTED_COLOR; // unused
listbox_colors[DLG_COLOR_SELECTED_FOCUS] = PMENU_SELECTED_COLOR; // unused
listbox_colors[DLG_COLOR_TITLE] = PMENU_TITLE_COLOR;
}

Expand Down
2 changes: 2 additions & 0 deletions lib/widget/dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ typedef enum
DLG_COLOR_FOCUS,
DLG_COLOR_HOT_NORMAL,
DLG_COLOR_HOT_FOCUS,
DLG_COLOR_SELECTED_NORMAL,
DLG_COLOR_SELECTED_FOCUS,
DLG_COLOR_TITLE,
DLG_COLOR_COUNT
} dlg_colors_enum_t;
Expand Down
3 changes: 2 additions & 1 deletion lib/widget/listbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ listbox_draw (WListbox *l, gboolean focused)

disabled = widget_get_state (wl, WST_DISABLED);
normalc = disabled ? DISABLED_COLOR : colors[DLG_COLOR_NORMAL];
selc = disabled ? DISABLED_COLOR : colors[focused ? DLG_COLOR_HOT_FOCUS : DLG_COLOR_FOCUS];
selc = disabled ? DISABLED_COLOR
: colors[focused ? DLG_COLOR_SELECTED_FOCUS : DLG_COLOR_SELECTED_NORMAL];

if (l->list != NULL)
{
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/dark.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
dfocus = blue;cyan
dhotnormal = white;
dhotfocus = white;cyan
dselnormal = blue;cyan
dselfocus = white;cyan
dtitle = white;

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/darkfar.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
dfocus = blue;cyan
dhotnormal = white;
dhotfocus = white;cyan
dselnormal = blue;cyan
dselfocus = white;cyan
dtitle = white;

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
dfocus = black;cyan
dhotnormal = blue;lightgray
dhotfocus = blue;cyan
dselnormal = black;cyan
dselfocus = blue;cyan
dtitle = blue;lightgray

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/double-lines.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
dfocus = black;cyan
dhotnormal = blue;lightgray
dhotfocus = blue;cyan
dselnormal = black;cyan
dselfocus = blue;cyan
dtitle = blue;lightgray

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/featured-plus.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
dfocus = black;cyan
dhotnormal = blue;lightgray
dhotfocus = blue;cyan
dselnormal = black;cyan
dselfocus = blue;cyan
dtitle = blue;lightgray

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/featured.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
dfocus = black;cyan
dhotnormal = blue;lightgray
dhotfocus = blue;cyan
dselnormal = black;cyan
dselfocus = blue;cyan
dtitle = blue;lightgray

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/gotar.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
dfocus = brightred;black
dhotnormal = brightred;
dhotfocus = yellow;black
dselnormal = brightred;black
dselfocus = yellow;black
dtitle = brightred;

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/gray-green-purple256.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
dfocus = ;main1
dhotnormal = main2
dhotfocus = main2;main1
dselnormal = ;main1
dselfocus = main2;main1
dtitle = main2

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/gray-orange-blue256.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
dfocus = ;main1
dhotnormal = main2
dhotfocus = main2;main1
dselnormal = ;main1
dselfocus = main2;main1
dtitle = main2

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/julia256.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
dfocus = black;cyan
dhotnormal = red;
dhotfocus = red;cyan
dselnormal = black;cyan
dselfocus = red;cyan
dtitle = black;

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/julia256root.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
dfocus = black;cyan
dhotnormal = red;
dhotfocus = red;cyan
dselnormal = black;cyan
dselfocus = red;cyan
dtitle = black;

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/mc46.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
dfocus = black;cyan
dhotnormal = blue;lightgray
dhotfocus = blue;cyan
dselnormal = black;cyan
dselfocus = blue;cyan
dtitle = blue;lightgray

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16-defbg-thin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
dhotnormal = color3
dfocus = color11;color2;bold
dhotfocus = color3;color2
dselnormal = color11;color2;bold
dselfocus = color3;color2
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16-defbg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
dhotnormal = color3
dfocus = color11;color2;bold
dhotfocus = color3;color2
dselnormal = color11;color2;bold
dselfocus = color3;color2
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16-thin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
dhotnormal = color3
dfocus = color11;color2;bold
dhotfocus = color3;color2
dselnormal = color11;color2;bold
dselfocus = color3;color2
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16.ini
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
dhotnormal = color3
dfocus = color11;color2;bold
dhotfocus = color3;color2
dselnormal = color11;color2;bold
dselfocus = color3;color2
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16root-defbg-thin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
dhotnormal = color3
dfocus = color11;color1;bold
dhotfocus = color5;color1;bold
dselnormal = color11;color1;bold
dselfocus = color5;color1;bold
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16root-defbg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
dhotnormal = color3
dfocus = color11;color1;bold
dhotfocus = color5;color1;bold
dselnormal = color11;color1;bold
dselfocus = color5;color1;bold
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16root-thin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
dhotnormal = color3
dfocus = color11;color1;bold
dhotfocus = color5;color1;bold
dselnormal = color11;color1;bold
dselfocus = color5;color1;bold
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarcon16root.ini
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
dhotnormal = color3
dfocus = color11;color1;bold
dhotfocus = color5;color1;bold
dselnormal = color11;color1;bold
dselfocus = color5;color1;bold
dtitle = color11;;bold

[error]
Expand Down
2 changes: 2 additions & 0 deletions misc/skins/modarin256-defbg-thin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
dhotnormal = color214
dfocus = color228;color23;bold
dhotfocus = color214;color23
dselnormal = color228;color23;bold
dselfocus = color214;color23
dtitle = color180;;bold

[error]
Expand Down
Loading
Loading