epgview: fix content of small bottom box in movieplayer mode

Origin commit data
------------------
Branch: ni/coolstream
Commit: 99de005c68
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-10 (Wed, 10 Aug 2016)

Origin message was:
------------------
- epgview: fix content of small bottom box in movieplayer mode

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-08-10 12:17:16 +02:00
parent 9050d84345
commit 5a06e8e04d
2 changed files with 55 additions and 54 deletions

View File

@@ -663,8 +663,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
tmdb_active = false; tmdb_active = false;
stars = 0; stars = 0;
int height = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight();
t_channel_id epg_id = channel_id; t_channel_id epg_id = channel_id;
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id); CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
if (channel) if (channel)
@@ -875,48 +873,44 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
if (headerPic) if (headerPic)
headerPic->paint(CC_SAVE_SCREEN_NO); headerPic->paint(CC_SAVE_SCREEN_NO);
//show date-time....
frameBuffer->paintBoxRel(sx, sy+oy-botboxheight, ox, botboxheight, COL_MENUHEAD_PLUS_0);
std::string fromto;
int widthl,widthr;
fromto = epg_start;
fromto += " - ";
fromto += epg_end;
widthl = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(fromto);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+40, sy+oy-3, widthl, fromto, COL_MENUHEAD_TEXT);
widthr = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(epg_date);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ox-40-widthr, sy+oy-3, widthr, epg_date, COL_MENUHEAD_TEXT);
int showPos = 0; int showPos = 0;
textCount = epgText.size(); textCount = epgText.size();
showText(showPos, sy + toph); showText(showPos, sy + toph);
// small bottom box
frameBuffer->paintBoxRel(sx, sy+oy-botboxheight, ox, botboxheight, COL_MENUHEAD_PLUS_0);
if (!mp_info)
{
static int iw = 0, ih = 0, io = 0;
if (!iw && !ih)
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_LEFT, &iw, &ih);
if (!io && iw)
io = iw + 10;
std::string fromto = epg_start + " - " + epg_end;
int widthl = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(fromto);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+10+io, sy+oy-3, widthl, fromto, COL_MENUHEAD_TEXT);
int widthr = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(epg_date);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ox-10-io-widthr, sy+oy-3, widthr, epg_date, COL_MENUHEAD_TEXT);
GetPrevNextEPGData(epgData.eventID, &epgData.epg_times.startzeit);
if (!call_fromfollowlist)
{
int iy = sy + oy - botboxheight + (botboxheight - iw)/2;
if (prev_id)
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_LEFT, sx + 10, iy);
if (next_id)
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RIGHT, sx + ox - iw - 10, iy);
}
// why we do not show movie progress?
showProgressBar();
}
// show Timer Event Buttons // show Timer Event Buttons
showTimerEventBar(true, isCurrentEPG(channel_id), mp_info); showTimerEventBar(true, isCurrentEPG(channel_id), mp_info);
//show progressbar
if (!mp_info && epg_done!= -1)
{
int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1);
CProgressBar pb(pbx, sy+oy-height, 104, height-6);
pb.setType(CProgressBar::PB_TIMESCALE);
pb.setValues(epg_done, 100);
pb.paint(false);
}
static int iw = 0, ih = 0;
if (!iw && !ih)
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_LEFT, &iw, &ih);
GetPrevNextEPGData( epgData.eventID, &epgData.epg_times.startzeit );
if (!call_fromfollowlist) {
int iy = sy + oy - 3 - height/2 - iw/2;
if (prev_id)
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_LEFT, sx + 5, iy);
if (next_id)
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RIGHT, sx + ox - iw - 5, iy);
}
if ( doLoop ) if ( doLoop )
{ {
neutrino_msg_t msg = 0; neutrino_msg_t msg = 0;
@@ -945,17 +939,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
} }
else else
CNeutrinoApp::getInstance()->handleMsg(msg, data); CNeutrinoApp::getInstance()->handleMsg(msg, data);
if (!mp_info) if (!mp_info)
{ {
if (data == g_InfoViewer->getUpdateTimer()) { if (data == g_InfoViewer->getUpdateTimer())
{
GetEPGData(channel_id, id, &startzeit, false); GetEPGData(channel_id, id, &startzeit, false);
if ( epg_done!= -1 ) { showProgressBar();
int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1);
CProgressBar pb(pbx, sy+oy-height, 104, height-6);
pb.setType(CProgressBar::PB_TIMESCALE);
pb.setValues(epg_done, 100);
pb.paint(false);
}
} }
} }
break; break;
@@ -967,21 +957,15 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
CNeutrinoApp::getInstance()->handleMsg(msg, data); CNeutrinoApp::getInstance()->handleMsg(msg, data);
break; break;
case CRCInput::RC_left: case CRCInput::RC_left:
if ((prev_id != 0) && !call_fromfollowlist) if ((prev_id != 0) && !call_fromfollowlist && !mp_info)
{ {
frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT_TEXT_PLUS_1);
show(channel_id, prev_id, &prev_zeit, false); show(channel_id, prev_id, &prev_zeit, false);
showPos=0; showPos=0;
} }
break; break;
case CRCInput::RC_right: case CRCInput::RC_right:
if ((next_id != 0) && !call_fromfollowlist) if ((next_id != 0) && !call_fromfollowlist && !mp_info)
{ {
frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT_TEXT_PLUS_1);
show(channel_id, next_id, &next_zeit, false); show(channel_id, next_id, &next_zeit, false);
showPos=0; showPos=0;
} }
@@ -1433,6 +1417,22 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
return count; return count;
} }
void CEpgData::showProgressBar()
{
//show progressbar
if (epg_done != -1)
{
int w = 104;
int x = sx + (ox - w)/2;
int h = botboxheight - 12;
int y = sy + oy - botboxheight + (botboxheight - h)/2;
CProgressBar pb(x, y, w, h);
pb.setType(CProgressBar::PB_TIMESCALE);
pb.setValues(epg_done, 100);
pb.paint(false);
}
}
// //
// -- Just display or hide TimerEventbar // -- Just display or hide TimerEventbar

View File

@@ -94,6 +94,7 @@ class CEpgData
bool hasFollowScreenings(const t_channel_id channel_id, const std::string & title); bool hasFollowScreenings(const t_channel_id channel_id, const std::string & title);
int FollowScreenings(const t_channel_id channel_id, const std::string & title); int FollowScreenings(const t_channel_id channel_id, const std::string & title);
void showTimerEventBar(bool show, bool adzap = false, bool mp_info = false); void showTimerEventBar(bool show, bool adzap = false, bool mp_info = false);
void showProgressBar();
bool isCurrentEPG(const t_channel_id channel_id); bool isCurrentEPG(const t_channel_id channel_id);
public: public: