Include state line in the header window
This commit is contained in:
@@ -258,7 +258,7 @@ void setWindowsDimensions()
|
|||||||
if (!Config.statusbar_visibility)
|
if (!Config.statusbar_visibility)
|
||||||
++MainHeight;
|
++MainHeight;
|
||||||
|
|
||||||
HeaderHeight = Config.design == Design::Alternative ? (Config.header_visibility ? 5 : 3) : 1;
|
HeaderHeight = Config.design == Design::Alternative ? (Config.header_visibility ? 5 : 3) : 2;
|
||||||
FooterStartY = LINES-(Config.statusbar_visibility ? 2 : 1);
|
FooterStartY = LINES-(Config.statusbar_visibility ? 2 : 1);
|
||||||
FooterHeight = Config.statusbar_visibility ? 2 : 1;
|
FooterHeight = Config.statusbar_visibility ? 2 : 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -716,21 +716,14 @@ void Status::Changes::flags()
|
|||||||
if (m_db_updating)
|
if (m_db_updating)
|
||||||
switch_state += m_db_updating;
|
switch_state += m_db_updating;
|
||||||
|
|
||||||
// this is done by raw ncurses because creating another
|
*wHeader << Config.state_line_color;
|
||||||
// window only for handling this is quite silly
|
mvwhline(wHeader->raw(), 1, 0, 0, COLS);
|
||||||
attrset(A_BOLD);
|
|
||||||
color_set(Config.state_line_color.pairNumber(), nullptr);
|
|
||||||
mvhline(1, 0, 0, COLS);
|
|
||||||
if (!switch_state.empty())
|
if (!switch_state.empty())
|
||||||
{
|
*wHeader << NC::XY(COLS-switch_state.length()-3, 1) << "["
|
||||||
mvprintw(1, COLS-switch_state.length()-3, "[");
|
<< Config.state_flags_color
|
||||||
color_set(Config.state_flags_color.pairNumber(), nullptr);
|
<< NC::Format::Bold << switch_state << NC::Format::NoBold
|
||||||
mvprintw(1, COLS-switch_state.length()-2, "%s", switch_state.c_str());
|
<< NC::Color::End
|
||||||
color_set(Config.state_line_color.pairNumber(), nullptr);
|
<< "]";
|
||||||
mvprintw(1, COLS-2, "]");
|
|
||||||
}
|
|
||||||
standend();
|
|
||||||
refresh();
|
|
||||||
break;
|
break;
|
||||||
case Design::Alternative:
|
case Design::Alternative:
|
||||||
switch_state += '[';
|
switch_state += '[';
|
||||||
@@ -748,9 +741,9 @@ void Status::Changes::flags()
|
|||||||
mvwhline(wHeader->raw(), 2, 0, 0, COLS);
|
mvwhline(wHeader->raw(), 2, 0, 0, COLS);
|
||||||
*wHeader << NC::Color::End << NC::Format::NoBold;
|
*wHeader << NC::Color::End << NC::Format::NoBold;
|
||||||
}
|
}
|
||||||
wHeader->refresh();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
wHeader->refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Status::Changes::mixer()
|
void Status::Changes::mixer()
|
||||||
|
|||||||
Reference in New Issue
Block a user