diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 96d0dd218..2666ad096 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -40,7 +40,6 @@ #include #include -#include #include #include #include @@ -345,6 +344,8 @@ EpgPlus::ChannelEntry::ChannelEntry(const CZapitChannel * pchannel, int pindex, this->x = px; this->y = py; this->width = pwidth; + + this->detailsLine = NULL; } void EpgPlus::ChannelEntry::init() @@ -362,6 +363,12 @@ EpgPlus::ChannelEntry::~ChannelEntry() delete *It; } this->channelEventEntries.clear(); + + if (this->detailsLine) + { + delete this->detailsLine; + this->detailsLine = NULL; + } } void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime) @@ -418,6 +425,28 @@ void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime) toggleColor = !toggleColor; } + + // kill detailsline + if (detailsLine) + { + detailsLine->kill(); + delete detailsLine; + detailsLine = NULL; + } + + // paint detailsline + if (isSelected) + { + int xPos = this->x - DETAILSLINE_WIDTH; + int yPosTop = this->y + this->font->getHeight()/2; + int yPosBottom = this->footer->y + this->footer->getUsedHeight()/2; + + if (detailsLine == NULL) + { + detailsLine = new CComponentsDetailsLine(xPos, yPosTop, yPosBottom, this->font->getHeight()/2, this->footer->getUsedHeight() - RADIUS_LARGE*2); + } + detailsLine->paint(false); + } } int EpgPlus::ChannelEntry::getUsedHeight() diff --git a/src/gui/epgplus.h b/src/gui/epgplus.h index 8cad4cb53..03ab5e295 100644 --- a/src/gui/epgplus.h +++ b/src/gui/epgplus.h @@ -25,6 +25,7 @@ #ifndef __epgplus__ #define __epgplus__ +#include #include "widget/menue.h" #include @@ -238,6 +239,7 @@ class EpgPlus static Font* font; TCChannelEventEntries channelEventEntries; + CComponentsDetailsLine *detailsLine; }; typedef std::vector TChannelEntries;