CChannelList::paint(): reduce background paint in miniTV mode

This commit is contained in:
Jacek Jendrzej
2013-07-23 19:24:42 +02:00
parent c71de7fea2
commit d5876963e7
2 changed files with 23 additions and 22 deletions

View File

@@ -2107,6 +2107,25 @@ void CChannelList::paint()
liststart = (selected/listmaxshow)*listmaxshow; liststart = (selected/listmaxshow)*listmaxshow;
updateEvents(this->historyMode ? 0:liststart, this->historyMode ? 0:(liststart + listmaxshow)); updateEvents(this->historyMode ? 0:liststart, this->historyMode ? 0:(liststart + listmaxshow));
if (g_settings.channellist_additional == 2) // with miniTV
{
// paint box for miniTV again - important!
frameBuffer->paintBoxFrame(x+width, y+theight , pig_width, pig_height, 10, COL_MENUCONTENT_PLUS_0, 0);
// 5px offset - same value as in list below
#if 0
/* focus: its possible now to scale video with still image, but on nevis
artifacts possible on SD osd */
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
#else
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) {
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
}
else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) {
g_PicViewer->DisplayImage(DATADIR "/neutrino/icons/radiomode.jpg", x+width+5, y+theight+5, pig_width-10, pig_height-10, frameBuffer->TM_NONE);
}
#endif
}
// paint background for main box // paint background for main box
frameBuffer->paintBoxRel(x, y+theight, width, height-footerHeight-theight, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x, y+theight, width, height-footerHeight-theight, COL_MENUCONTENT_PLUS_0);
if (g_settings.channellist_additional) if (g_settings.channellist_additional)
@@ -2114,7 +2133,7 @@ void CChannelList::paint()
// disable displayNext // disable displayNext
displayNext = false; displayNext = false;
// paint background for right box // paint background for right box
frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,pig_height+infozone_height,COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x+width,y+theight+pig_height,infozone_width,infozone_height,COL_MENUCONTENT_PLUS_0);
} }
for(unsigned int count = 0; count < listmaxshow; count++) { for(unsigned int count = 0; count < listmaxshow; count++) {
@@ -2132,24 +2151,6 @@ void CChannelList::paint()
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3);
showChannelLogo(); showChannelLogo();
if (g_settings.channellist_additional == 2) // with miniTV
{
// paint box for miniTV again - important!
frameBuffer->paintBoxRel(x+width, y+theight , pig_width, pig_height, COL_MENUCONTENT_PLUS_0);
// 5px offset - same value as in list below
#if 0
/* focus: its possible now to scale video with still image, but on nevis
artifacts possible on SD osd */
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
#else
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) {
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
}
else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) {
g_PicViewer->DisplayImage(DATADIR "/neutrino/icons/radiomode.jpg", x+width+5, y+theight+5, pig_width-10, pig_height-10, frameBuffer->TM_NONE);
}
#endif
}
} }
bool CChannelList::isEmpty() const bool CChannelList::isEmpty() const

View File

@@ -114,9 +114,9 @@ private:
void calcSize(); void calcSize();
std::string MaxChanNr(); std::string MaxChanNr();
void paint_pig(int x, int y, int w, int h); void paint_pig(int x, int y, int w, int h);
void paint_events(int index); void paint_events(int index);
CChannelEventList evtlist; CChannelEventList evtlist;
void readEvents(const t_channel_id channel_id); void readEvents(const t_channel_id channel_id);
void showdescription(int index); void showdescription(int index);
typedef std::pair<std::string,int> epg_pair; typedef std::pair<std::string,int> epg_pair;
std::vector<epg_pair> epgText; std::vector<epg_pair> epgText;