From 3aa0f6a03bf60fca3b77557817372845e1182018 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 6 Sep 2009 12:15:39 +0200 Subject: [PATCH] make color of separators used in alternative user interface customizable --- doc/config | 2 ++ doc/ncmpcpp.1 | 3 +++ src/ncmpcpp.cpp | 4 ++-- src/settings.cpp | 6 ++++++ src/settings.h | 1 + 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/config b/doc/config index 38e45023..2b39ad4d 100644 --- a/doc/config +++ b/doc/config @@ -304,6 +304,8 @@ # #statusbar_color = "default" # +#alternative_ui_separator_color = "black" +# #active_column_color = "red" # #window_border_color = "green" diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index dff17582..b7f8075e 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -274,6 +274,9 @@ Color of progressbar. .B statusbar_color = COLOR Color of statusbar. .TP +.B alternative_ui_separator_color = COLOR +Color of separators used in alternative user interface. +.TP .B active_column_color = COLOR Color of active column's highlight. .TP diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 7d4cb7f4..ffff5b32 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) { std::basic_string title = myScreen->Title(); *wHeader << XY(0, 3) << wclrtoeol; - *wHeader << fmtBold << clBlack; + *wHeader << fmtBold << Config.alternative_ui_separator_color; mvwhline(wHeader->Raw(), 2, 0, 0, COLS); mvwhline(wHeader->Raw(), 4, 0, 0, COLS); *wHeader << XY((COLS-Window::Length(title))/2, 3); @@ -267,7 +267,7 @@ int main(int argc, char *argv[]) # endif // ENABLE_CLOCK if (Config.new_design) { - *wHeader << fmtBold << clBlack; + *wHeader << fmtBold << Config.alternative_ui_separator_color; mvwhline(wHeader->Raw(), 2, 0, 0, COLS); mvwhline(wHeader->Raw(), 4, 0, 0, COLS); *wHeader << clEnd << fmtBoldEnd; diff --git a/src/settings.cpp b/src/settings.cpp index 0bcffd46..355b46d1 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -269,6 +269,7 @@ void DefaultConfiguration(ncmpcpp_config &conf) conf.main_highlight_color = conf.main_color; conf.progressbar_color = clDefault; conf.statusbar_color = clDefault; + conf.alternative_ui_separator_color = clBlack; conf.active_column_color = clRed; conf.window_border = brGreen; conf.active_window_border = brRed; @@ -884,6 +885,11 @@ void ReadConfiguration(ncmpcpp_config &conf) if (!v.empty()) conf.statusbar_color = IntoColor(v); } + else if (cl.find("alternative_ui_separator_color") != std::string::npos) + { + if (!v.empty()) + conf.alternative_ui_separator_color = IntoColor(v); + } else if (cl.find("active_column_color") != std::string::npos) { if (!v.empty()) diff --git a/src/settings.h b/src/settings.h index 2b755eb3..c45c06d7 100644 --- a/src/settings.h +++ b/src/settings.h @@ -162,6 +162,7 @@ struct ncmpcpp_config Color main_highlight_color; Color progressbar_color; Color statusbar_color; + Color alternative_ui_separator_color; Color active_column_color; Border window_border;