diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 975615f7c..f5e573d2e 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -920,24 +920,27 @@ void CEventList::showProgressBar(int pos) epg_done= nProcentagePassed; } + if (!pb) + { int pbw = 104; int pbx = x + (full_width - pbw)/2; int pbh = botboxheight - 12; int pby = y + height -iheight - botboxheight + (botboxheight - pbh)/2; + pb = new CProgressBar(pbx, pby, pbw, pbh); + pb->setType(CProgressBar::PB_TIMESCALE); + pb->doPaintBg(false); + } + //show progressbar - if (epg_done != -1) + if (epg_done > 0) { - CProgressBar pb(pbx, pby, pbw, pbh); - pb.setType(CProgressBar::PB_TIMESCALE); - pb.setValues(epg_done, 100); - pb.paint(false); + pb->setValues(epg_done, 100); + pb->paint(true); } else { - CComponentsShapeSquare pb(pbx, pby, pbw, pbh); - pb.setColorBody(COL_MENUHEAD_PLUS_0); - pb.paint(false); + pb->hide(); } } diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 512a38cf2..10d255f73 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -104,6 +104,7 @@ class CEventList : public CListHelpers event_id_t item_event_ID; CComponentsText *cc_infozone; CComponentsHeader *header; + CProgressBar *pb; const char * unit_short_minute; void paintItem(unsigned pos, t_channel_id channel_id = 0);