- epgplus: simplify detailsline handling; fix coords in hide()

This commit is contained in:
vanhofen
2017-04-08 14:11:28 +02:00
committed by svenhoefer
parent c3e49887de
commit 01e0ae3696

View File

@@ -425,14 +425,6 @@ void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime)
toggleColor = !toggleColor; toggleColor = !toggleColor;
} }
// kill detailsline
if (detailsLine)
{
detailsLine->kill();
delete detailsLine;
detailsLine = NULL;
}
// paint detailsline // paint detailsline
if (isSelected) if (isSelected)
{ {
@@ -441,9 +433,9 @@ void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime)
int yPosBottom = this->footer->y + this->footer->getUsedHeight()/2; int yPosBottom = this->footer->y + this->footer->getUsedHeight()/2;
if (detailsLine == NULL) if (detailsLine == NULL)
{ detailsLine = new CComponentsDetailsLine();
detailsLine = new CComponentsDetailsLine(xPos, yPosTop, yPosBottom, this->font->getHeight()/2, this->footer->getUsedHeight() - RADIUS_LARGE*2);
} detailsLine->setDimensionsAll(xPos, yPosTop, yPosBottom, this->font->getHeight()/2, this->footer->getUsedHeight() - RADIUS_LARGE*2);
detailsLine->paint(false); detailsLine->paint(false);
} }
} }
@@ -1273,7 +1265,7 @@ EpgPlus::TCChannelEventEntries::const_iterator EpgPlus::getSelectedEvent() const
void EpgPlus::hide() void EpgPlus::hide()
{ {
this->frameBuffer->paintBackgroundBoxRel(this->usableScreenX, this->usableScreenY, this->usableScreenWidth, this->usableScreenHeight); this->frameBuffer->paintBackgroundBoxRel(this->usableScreenX - DETAILSLINE_WIDTH, this->usableScreenY, DETAILSLINE_WIDTH + this->usableScreenWidth, this->usableScreenHeight);
} }
void EpgPlus::paintChannelEntry(int position) void EpgPlus::paintChannelEntry(int position)