global: remove RedrawHeader
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user