mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
EpgPlus: simplify calls of logo attributes and logo instance
This commit is contained in:
@@ -111,20 +111,23 @@ void EpgPlus::Header::paint(const char * Name)
|
|||||||
std::string caption = Name ? Name : g_Locale->getText(LOCALE_EPGPLUS_HEAD);
|
std::string caption = Name ? Name : g_Locale->getText(LOCALE_EPGPLUS_HEAD);
|
||||||
|
|
||||||
if (this->head == NULL)
|
if (this->head == NULL)
|
||||||
|
{
|
||||||
this->head = new CComponentsHeader();
|
this->head = new CComponentsHeader();
|
||||||
|
this->head->setContextButton(CComponentsHeader::CC_BTN_HELP);
|
||||||
|
this->head->enableClock(true, "%H:%M", "%H %M", true);
|
||||||
|
}
|
||||||
|
|
||||||
if (this->head)
|
if (this->head)
|
||||||
{
|
{
|
||||||
if (g_settings.channellist_show_channellogo)
|
if (g_settings.channellist_show_channellogo)
|
||||||
{
|
{
|
||||||
// ensure to have clean background
|
// ensure to have clean background
|
||||||
this->head->getChannelLogoObject()->hide();
|
this->logo = this->head->getChannelLogoObject();
|
||||||
this->head->getChannelLogoObject()->allowPaint(false);
|
this->logo->hide();
|
||||||
|
this->logo->allowPaint(false);
|
||||||
}
|
}
|
||||||
this->head->setDimensionsAll(this->x, this->y, this->width, this->font->getHeight());
|
this->head->setDimensionsAll(this->x, this->y, this->width, this->font->getHeight());
|
||||||
this->head->setCaption(caption, CTextBox::NO_AUTO_LINEBREAK);
|
this->head->setCaption(caption, CTextBox::NO_AUTO_LINEBREAK);
|
||||||
this->head->setContextButton(CComponentsHeader::CC_BTN_HELP);
|
|
||||||
this->head->enableClock(true, "%H:%M", "%H %M", true);
|
|
||||||
this->head->paint(CC_SAVE_SCREEN_NO);
|
this->head->paint(CC_SAVE_SCREEN_NO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,14 +139,14 @@ void EpgPlus::Header::paintChannelLogo(const CZapitChannel * Channel)
|
|||||||
|
|
||||||
if (this->head)
|
if (this->head)
|
||||||
{
|
{
|
||||||
this->head->getChannelLogoObject()->hide();
|
this->logo->hide();
|
||||||
this->head->getChannelLogoObject()->clearSavedScreen();
|
this->logo->clearSavedScreen();
|
||||||
if (Channel)
|
if (Channel)
|
||||||
{
|
{
|
||||||
this->head->setChannelLogo(Channel->getChannelID(), Channel->getName());
|
this->head->setChannelLogo(Channel->getChannelID(), Channel->getName());
|
||||||
}
|
}
|
||||||
this->head->getChannelLogoObject()->allowPaint(true);
|
this->logo->allowPaint(true);
|
||||||
this->head->getChannelLogoObject()->paint();
|
this->logo->paint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -69,6 +69,8 @@ class EpgPlus
|
|||||||
|
|
||||||
class Header
|
class Header
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
CComponentsChannelLogoScalable *logo;
|
||||||
//// construction / destruction
|
//// construction / destruction
|
||||||
public:
|
public:
|
||||||
Header(CFrameBuffer* frameBuffer,
|
Header(CFrameBuffer* frameBuffer,
|
||||||
|
Reference in New Issue
Block a user