make color of separators used in alternative user interface customizable

This commit is contained in:
Andrzej Rybczak
2009-09-06 12:15:39 +02:00
parent 7079bf0584
commit 3aa0f6a03b
5 changed files with 14 additions and 2 deletions

View File

@@ -304,6 +304,8 @@
#
#statusbar_color = "default"
#
#alternative_ui_separator_color = "black"
#
#active_column_color = "red"
#
#window_border_color = "green"

View File

@@ -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

View File

@@ -237,7 +237,7 @@ int main(int argc, char *argv[])
{
std::basic_string<my_char_t> 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;

View File

@@ -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())

View File

@@ -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;