From 6c9da30dc659817a64167b34d958d4c1adfc1098 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 8 Apr 2017 14:11:28 +0200 Subject: [PATCH] epgplus: add an inner small offset and a small frame to footer Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/45139536070cbec3956c5e5e647411778fe778aa Author: vanhofen 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 --- src/gui/epgplus.cpp | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 4a505c1e4..779d3098f 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -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); }