From 3108fbf0c00d40955b491fd8b6bab44ce414486a Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 6 Sep 2009 12:55:46 +0200 Subject: [PATCH] fix two minor bugs with colors 1. I used statusbar_color instead of header_color by accident 2. state_line_color has to be explicitely turned off before setting new color --- src/ncmpcpp.cpp | 2 +- src/status.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 58021c8a..e2f752e6 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -241,7 +241,7 @@ int main(int argc, char *argv[]) mvwhline(wHeader->Raw(), 2, 0, 0, COLS); mvwhline(wHeader->Raw(), 4, 0, 0, COLS); *wHeader << XY((COLS-Window::Length(title))/2, 3); - *wHeader << Config.statusbar_color << title << clEnd; + *wHeader << Config.header_color << title << clEnd; *wHeader << clEnd << fmtBoldEnd; } else diff --git a/src/status.cpp b/src/status.cpp index e1a90c31..1d4a916c 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -600,6 +600,7 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *) if (!switch_state.empty()) { mvprintw(1, COLS-switch_state.length()-3, "["); + attroff(COLOR_PAIR(Config.state_line_color)); attron(COLOR_PAIR(Config.state_flags_color)); mvprintw(1, COLS-switch_state.length()-2, "%s", switch_state.c_str()); attroff(COLOR_PAIR(Config.state_flags_color));