summaryrefslogtreecommitdiff
path: root/src/title.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2016-12-22 16:31:41 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2016-12-23 22:52:47 +0100
commita488c2d89d1101a3688ca568ee298af8c3f5c7d3 (patch)
treee665d4e294d4641d2da75c5da7ece8b6e465073a /src/title.cpp
parent9c13827b62029c1c51e08ab69c7a66635a9e5bf8 (diff)
Support attaching format information to selected color variables
Diffstat (limited to 'src/title.cpp')
-rw-r--r--src/title.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/title.cpp b/src/title.cpp
index fa296352..b42e4950 100644
--- a/src/title.cpp
+++ b/src/title.cpp
@@ -43,20 +43,28 @@ void drawHeader()
switch (Config.design)
{
case Design::Classic:
- *wHeader << NC::XY(0, 0) << NC::TermManip::ClearToEOL << NC::Format::Bold << myScreen->title() << NC::Format::NoBold;
- *wHeader << Config.volume_color;
- *wHeader << NC::XY(wHeader->getWidth()-VolumeState.length(), 0) << VolumeState;
- *wHeader << NC::Color::End;
+ *wHeader << NC::XY(0, 0)
+ << NC::TermManip::ClearToEOL
+ << NC::Format::Bold
+ << myScreen->title()
+ << NC::Format::NoBold
+ << NC::XY(wHeader->getWidth()-VolumeState.length(), 0)
+ << Config.volume_color
+ << VolumeState
+ << NC::FormattedColor::End(Config.volume_color);
break;
case Design::Alternative:
std::wstring title = myScreen->title();
- *wHeader << NC::XY(0, 3) << NC::TermManip::ClearToEOL;
- *wHeader << NC::Format::Bold << Config.alternative_ui_separator_color;
+ *wHeader << NC::XY(0, 3)
+ << NC::TermManip::ClearToEOL
+ << Config.alternative_ui_separator_color;
mvwhline(wHeader->raw(), 2, 0, 0, COLS);
mvwhline(wHeader->raw(), 4, 0, 0, COLS);
- *wHeader << NC::XY((COLS-wideLength(title))/2, 3);
- *wHeader << Config.header_color << title << NC::Color::End;
- *wHeader << NC::Color::End << NC::Format::NoBold;
+ *wHeader << NC::FormattedColor::End(Config.alternative_ui_separator_color)
+ << NC::XY((COLS-wideLength(title))/2, 3)
+ << NC::Format::Bold
+ << title
+ << NC::Format::NoBold;
break;
}
wHeader->refresh();