global: remove RedrawHeader

This commit is contained in:
Andrzej Rybczak
2012-09-06 16:49:47 +02:00
parent f0cac617fa
commit c935dcf11a
20 changed files with 53 additions and 64 deletions

View File

@@ -643,6 +643,31 @@ void NcmpcppStatusChanged(MPD::Connection *, MPD::StatusChanges changed, void *)
ApplyToVisibleWindows(&BasicScreen::RefreshWindow);
}
void DrawHeader()
{
if (!Config.header_visibility)
return;
if (Config.new_design)
{
std::basic_string<my_char_t> title = myScreen->Title();
*wHeader << NC::XY(0, 3) << wclrtoeol;
*wHeader << NC::fmtBold << Config.alternative_ui_separator_color;
mvwhline(wHeader->raw(), 2, 0, 0, COLS);
mvwhline(wHeader->raw(), 4, 0, 0, COLS);
*wHeader << NC::XY((COLS-NC::Window::length(title))/2, 3);
*wHeader << Config.header_color << title << NC::clEnd;
*wHeader << NC::clEnd << NC::fmtBoldEnd;
}
else
{
*wHeader << NC::XY(0, 0) << wclrtoeol << NC::fmtBold << myScreen->Title() << NC::fmtBoldEnd;
*wHeader << Config.volume_color;
*wHeader << NC::XY(wHeader->getWidth()-VolumeState.length(), 0) << VolumeState;
*wHeader << NC::clEnd;
}
wHeader->refresh();
}
NC::Window &Statusbar()
{
*wFooter << NC::XY(0, Config.statusbar_visibility) << wclrtoeol;