status: fix drawing progressbar if third character was not specified
This commit is contained in:
@@ -655,10 +655,16 @@ void DrawProgressbar(unsigned elapsed, unsigned time)
|
|||||||
{
|
{
|
||||||
unsigned pb_width = wFooter->GetWidth();
|
unsigned pb_width = wFooter->GetWidth();
|
||||||
unsigned howlong = time ? pb_width*elapsed/time : 0;
|
unsigned howlong = time ? pb_width*elapsed/time : 0;
|
||||||
*wFooter << fmtBold << Config.progressbar_color << XY(0, 0);
|
*wFooter << fmtBold << Config.progressbar_color;
|
||||||
for (unsigned i = 0; i < pb_width; ++i)
|
if (Config.progressbar[2] != '\0')
|
||||||
*wFooter << Config.progressbar[2];
|
{
|
||||||
wFooter->GotoXY(0, 0);
|
wFooter->GotoXY(0, 0);
|
||||||
|
for (unsigned i = 0; i < pb_width; ++i)
|
||||||
|
*wFooter << Config.progressbar[2];
|
||||||
|
wFooter->GotoXY(0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
mvwhline(wFooter->Raw(), 0, 0, 0, pb_width);
|
||||||
if (time)
|
if (time)
|
||||||
{
|
{
|
||||||
pb_width = std::min(size_t(howlong), wFooter->GetWidth());
|
pb_width = std::min(size_t(howlong), wFooter->GetWidth());
|
||||||
|
|||||||
Reference in New Issue
Block a user