epgplus: add an inner small offset and a small frame to footer

Origin commit data
------------------
Branch: ni/coolstream
Commit: 4513953607
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-04-08 (Sat, 08 Apr 2017)

Origin message was:
------------------
- epgplus: add an inner small offset and a small frame to footer

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-04-08 14:11:28 +02:00
parent abac099187
commit 6c9da30dc6

View File

@@ -459,41 +459,28 @@ void EpgPlus::Footer::setBouquetChannelName(const std::string & newBouquetName,
int EpgPlus::Footer::getUsedHeight()
{
return fontBouquetChannelName->getHeight() + fontEventDescription->getHeight() + fontEventInfo1->getHeight();
return fontBouquetChannelName->getHeight() + fontEventDescription->getHeight() + fontEventInfo1->getHeight() + 2*OFFSET_INNER_SMALL;
}
void EpgPlus::Footer::paintEventDetails(const std::string & description, const std::string & info1)
{
int yPos = this->y;
int frame_thickness = 2;
int height = this->fontBouquetChannelName->getHeight();
// clear the whole footer
this->frameBuffer->paintBoxRel(this->x, yPos, this->width, this->getUsedHeight(), COL_MENUCONTENTDARK_PLUS_0);
this->frameBuffer->paintBoxFrame(this->x, yPos, this->width, this->getUsedHeight(), frame_thickness, COL_FRAME_PLUS_0);
// clear the region
this->frameBuffer->paintBoxRel(this->x, yPos, this->width, height, COL_MENUCONTENTDARK_PLUS_0);
yPos += height;
// display new text
// display bouquet and channel name
yPos += OFFSET_INNER_SMALL + this->fontBouquetChannelName->getHeight();
this->fontBouquetChannelName->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2*OFFSET_INNER_MID, this->currentBouquetName + ": " + this->currentChannelName, COL_MENUCONTENT_TEXT);
height = this->fontEventDescription->getHeight();
// clear the region
this->frameBuffer->paintBoxRel(this->x, yPos, this->width, height, COL_MENUCONTENTDARK_PLUS_0);
yPos += height;
// display new text
// display event's descrition
yPos += this->fontEventDescription->getHeight();
this->fontEventDescription->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2*OFFSET_INNER_MID, description, COL_MENUCONTENT_TEXT);
height = this->fontEventInfo1->getHeight();
// clear the region
this->frameBuffer->paintBoxRel(this->x, yPos, this->width, height, COL_MENUCONTENTDARK_PLUS_0);
yPos += height;
// display new text
// display event's info1
yPos += this->fontEventInfo1->getHeight();
this->fontEventInfo1->RenderString(this->x + OFFSET_INNER_MID, yPos, this->width - 2*OFFSET_INNER_MID, info1, COL_MENUCONTENT_TEXT);
}