- epgplus: always show a progressbar in secondary timeline ...

to avoid 'design changes' when cursor is moved left or right
This commit is contained in:
vanhofen
2017-04-10 10:26:21 +02:00
committed by svenhoefer
parent 44a0ec422e
commit 56302f9eb7

View File

@@ -198,18 +198,20 @@ void EpgPlus::TimeLine::paintMark(time_t _startTime, int pduration, int px, int
this->clearMark(); this->clearMark();
// paint new mark // paint new mark
time_t azeit; CProgressBar pbbar = CProgressBar(px, this->y + this->font->getHeight(), pwidth, this->font->getHeight());
time(&azeit); pbbar.setActiveColor(COL_MENUCONTENTSELECTED_PLUS_0);
if ((azeit > _startTime) && (azeit < _startTime + pduration))
time_t currentTime;
time(&currentTime);
if ((currentTime > _startTime) && (currentTime < _startTime + pduration))
{ {
CProgressBar pbbar = CProgressBar(px,this->y + this->font->getHeight(),pwidth,this->font->getHeight()); pbbar.setValues((currentTime - _startTime), pduration);
pbbar.setValues((azeit - _startTime),pduration);
pbbar.setActiveColor(COL_MENUCONTENTSELECTED_PLUS_0);
pbbar.paint();
} }
else else
this->frameBuffer->paintBoxRel(px, this->y + this->font->getHeight(), {
pwidth, this->font->getHeight() , COL_MENUCONTENTSELECTED_PLUS_0); pbbar.setValues(0, pduration);
}
pbbar.paint();
// display start time before mark // display start time before mark
std::string timeStr = EpgPlus::getTimeString(_startTime, "%H:%M"); std::string timeStr = EpgPlus::getTimeString(_startTime, "%H:%M");