eventlist: fix gradient background

Signed-off-by: Thilo Graf <dbt@novatux.de>
review required


Origin commit data
------------------
Branch: ni/coolstream
Commit: ae0810e339
Author: TangoCash <eric@loxat.de>
Date: 2017-05-03 (Wed, 03 May 2017)

Origin message was:
------------------
-eventlist: fix gradient background

Signed-off-by: Thilo Graf <dbt@novatux.de>
review required


------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2017-05-03 21:29:41 +02:00
committed by Thilo Graf
parent bb4fd66cae
commit 1dbd9769df
2 changed files with 12 additions and 8 deletions

View File

@@ -920,24 +920,27 @@ void CEventList::showProgressBar(int pos)
epg_done= nProcentagePassed; epg_done= nProcentagePassed;
} }
if (!pb)
{
int pbw = 104; int pbw = 104;
int pbx = x + (full_width - pbw)/2; int pbx = x + (full_width - pbw)/2;
int pbh = botboxheight - 12; int pbh = botboxheight - 12;
int pby = y + height -iheight - botboxheight + (botboxheight - pbh)/2; 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 //show progressbar
if (epg_done != -1) if (epg_done > 0)
{ {
CProgressBar pb(pbx, pby, pbw, pbh); pb->setValues(epg_done, 100);
pb.setType(CProgressBar::PB_TIMESCALE); pb->paint(true);
pb.setValues(epg_done, 100);
pb.paint(false);
} }
else else
{ {
CComponentsShapeSquare pb(pbx, pby, pbw, pbh); pb->hide();
pb.setColorBody(COL_MENUHEAD_PLUS_0);
pb.paint(false);
} }
} }

View File

@@ -104,6 +104,7 @@ class CEventList : public CListHelpers
event_id_t item_event_ID; event_id_t item_event_ID;
CComponentsText *cc_infozone; CComponentsText *cc_infozone;
CComponentsHeader *header; CComponentsHeader *header;
CProgressBar *pb;
const char * unit_short_minute; const char * unit_short_minute;
void paintItem(unsigned pos, t_channel_id channel_id = 0); void paintItem(unsigned pos, t_channel_id channel_id = 0);