mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
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:
@@ -663,8 +663,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
tmdb_active = false;
|
||||
stars = 0;
|
||||
|
||||
int height = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight();
|
||||
|
||||
t_channel_id epg_id = channel_id;
|
||||
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
|
||||
if (channel)
|
||||
@@ -875,47 +873,43 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
if (headerPic)
|
||||
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;
|
||||
textCount = epgText.size();
|
||||
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
|
||||
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 )
|
||||
{
|
||||
@@ -945,17 +939,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
}
|
||||
else
|
||||
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
||||
|
||||
if (!mp_info)
|
||||
{
|
||||
if (data == g_InfoViewer->getUpdateTimer()) {
|
||||
if (data == g_InfoViewer->getUpdateTimer())
|
||||
{
|
||||
GetEPGData(channel_id, id, &startzeit, false);
|
||||
if ( 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);
|
||||
}
|
||||
showProgressBar();
|
||||
}
|
||||
}
|
||||
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);
|
||||
break;
|
||||
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);
|
||||
showPos=0;
|
||||
}
|
||||
break;
|
||||
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);
|
||||
showPos=0;
|
||||
}
|
||||
@@ -1433,6 +1417,22 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
|
||||
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
|
||||
|
Reference in New Issue
Block a user