mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-11 00:40:00 +00:00
Use default terminal colors where necessary if custom colors are completely disabled.
This commit is contained in:
parent
7d906dc03f
commit
05638c30e7
@ -172,8 +172,8 @@ struct Theme {
|
|||||||
/* initializes all of the color pairs from the specified colors, then applies them
|
/* initializes all of the color pairs from the specified colors, then applies them
|
||||||
to the current session! */
|
to the current session! */
|
||||||
void Apply(Color::Mode mode) {
|
void Apply(Color::Mode mode) {
|
||||||
int backgroundId = background.Id(mode, COLOR_BLACK);
|
int backgroundId = background.Id(mode, -1);
|
||||||
int foregroundId = foreground.Id(mode, COLOR_WHITE);
|
int foregroundId = foreground.Id(mode, -1);
|
||||||
|
|
||||||
/* main */
|
/* main */
|
||||||
init_pair(CURSESPP_DEFAULT_CONTENT_COLOR, foregroundId, backgroundId);
|
init_pair(CURSESPP_DEFAULT_CONTENT_COLOR, foregroundId, backgroundId);
|
||||||
@ -182,7 +182,7 @@ struct Theme {
|
|||||||
|
|
||||||
/* text */
|
/* text */
|
||||||
init_pair(CURSESPP_TEXT_DEFAULT, foregroundId, backgroundId);
|
init_pair(CURSESPP_TEXT_DEFAULT, foregroundId, backgroundId);
|
||||||
init_pair(CURSESPP_TEXT_DISABLED, textDisabled.Id(mode, COLOR_WHITE), backgroundId);
|
init_pair(CURSESPP_TEXT_DISABLED, textDisabled.Id(mode, -1), backgroundId);
|
||||||
init_pair(CURSESPP_TEXT_FOCUSED, textFocused.Id(mode, COLOR_RED), backgroundId);
|
init_pair(CURSESPP_TEXT_FOCUSED, textFocused.Id(mode, COLOR_RED), backgroundId);
|
||||||
init_pair(CURSESPP_TEXT_ACTIVE, textActive.Id(mode, COLOR_GREEN), backgroundId);
|
init_pair(CURSESPP_TEXT_ACTIVE, textActive.Id(mode, COLOR_GREEN), backgroundId);
|
||||||
init_pair(CURSESPP_TEXT_WARNING, textWarning.Id(mode, COLOR_YELLOW), backgroundId);
|
init_pair(CURSESPP_TEXT_WARNING, textWarning.Id(mode, COLOR_YELLOW), backgroundId);
|
||||||
@ -190,16 +190,16 @@ struct Theme {
|
|||||||
init_pair(CURSESPP_TEXT_HIDDEN, textHidden.Id(mode, COLOR_BLACK), backgroundId);
|
init_pair(CURSESPP_TEXT_HIDDEN, textHidden.Id(mode, COLOR_BLACK), backgroundId);
|
||||||
|
|
||||||
/* overlay */
|
/* overlay */
|
||||||
int overlayBgId = overlayBackground.Id(mode, COLOR_BLACK);
|
int overlayBgId = overlayBackground.Id(mode, -1);
|
||||||
init_pair(CURSESPP_OVERLAY_FRAME, overlayBorder.Id(mode, COLOR_BLUE), overlayBgId);
|
init_pair(CURSESPP_OVERLAY_FRAME, overlayBorder.Id(mode, COLOR_BLUE), overlayBgId);
|
||||||
init_pair(CURSESPP_OVERLAY_CONTENT, overlayForeground.Id(mode, COLOR_WHITE), overlayBgId);
|
init_pair(CURSESPP_OVERLAY_CONTENT, overlayForeground.Id(mode, -1), overlayBgId);
|
||||||
init_pair(CURSESPP_OVERLAY_INPUT_FRAME, overlayFocusedBorder.Id(mode, COLOR_RED), overlayBgId);
|
init_pair(CURSESPP_OVERLAY_INPUT_FRAME, overlayFocusedBorder.Id(mode, COLOR_RED), overlayBgId);
|
||||||
|
|
||||||
/* shortcuts */
|
/* shortcuts */
|
||||||
init_pair(
|
init_pair(
|
||||||
CURSESPP_SHORTCUT_ROW_NORMAL,
|
CURSESPP_SHORTCUT_ROW_NORMAL,
|
||||||
shortcutsForeground.Id(mode, COLOR_YELLOW),
|
shortcutsForeground.Id(mode, COLOR_YELLOW),
|
||||||
shortcutsBackground.Id(mode, COLOR_BLACK));
|
shortcutsBackground.Id(mode, -1));
|
||||||
|
|
||||||
init_pair(
|
init_pair(
|
||||||
CURSESPP_SHORTCUT_ROW_FOCUSED,
|
CURSESPP_SHORTCUT_ROW_FOCUSED,
|
||||||
@ -227,7 +227,7 @@ struct Theme {
|
|||||||
init_pair(
|
init_pair(
|
||||||
CURSESPP_LIST_ITEM_HEADER,
|
CURSESPP_LIST_ITEM_HEADER,
|
||||||
listHeaderForeground.Id(mode, COLOR_GREEN),
|
listHeaderForeground.Id(mode, COLOR_GREEN),
|
||||||
listHeaderBackground.Id(mode, COLOR_BLACK));
|
listHeaderBackground.Id(mode, -1));
|
||||||
|
|
||||||
init_pair(
|
init_pair(
|
||||||
CURSESPP_SELECTED_LIST_ITEM,
|
CURSESPP_SELECTED_LIST_ITEM,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user