mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
-eventlist,epgview: adjust style, implement new header class
picked from: https://github.com/TangoCash/neutrino-mp-cst-next commit: 477db186ee4f306e191035ed2201ff4fc9d70b9d Signed-off-by: Thilo Graf <dbt@novatux.de> review reqiured
This commit is contained in:
@@ -712,46 +712,16 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
const int pic_h = 39;
|
const int pic_h = 39;
|
||||||
toph = std::max(toph, pic_h);
|
toph = std::max(toph, pic_h);
|
||||||
|
|
||||||
// Calculate offset for the title when logo appears.
|
|
||||||
int pic_offx = 0;
|
|
||||||
std::string lname;
|
std::string lname;
|
||||||
int logo_w = 0;
|
|
||||||
int logo_h = 0;
|
|
||||||
int logo_w_max = ox / 4;
|
|
||||||
int logo_h_max = toph - 2*OFFSET_INNER_MIN;
|
|
||||||
std::string channel_name;
|
std::string channel_name;
|
||||||
if (mp_info)
|
if (mp_info)
|
||||||
channel_name = mp_movie_info->channelName;
|
channel_name = mp_movie_info->channelName;
|
||||||
else
|
else
|
||||||
channel_name = g_Zapit->getChannelName(channel_id);
|
channel_name = g_Zapit->getChannelName(channel_id);
|
||||||
if (g_settings.infobar_show_channellogo && g_PicViewer->GetLogoName(channel_id, channel_name, lname, &logo_w, &logo_h))
|
|
||||||
{
|
|
||||||
if ((logo_h > logo_h_max) || (logo_w > logo_w_max))
|
|
||||||
g_PicViewer->rescaleImageDimensions(&logo_w, &logo_h, logo_w_max, logo_h_max);
|
|
||||||
pic_offx = logo_w + OFFSET_INNER_MID;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pos;
|
|
||||||
std::string text1 = epgData.title;
|
|
||||||
std::string text2 = "";
|
|
||||||
if (g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getRenderWidth(text1) > ox - pic_offx - 2*OFFSET_INNER_MID)
|
|
||||||
{
|
|
||||||
do
|
|
||||||
{
|
|
||||||
pos = text1.find_last_of("[ .]+");
|
|
||||||
if (pos != -1)
|
|
||||||
text1 = text1.substr(0, pos);
|
|
||||||
} while ((pos != -1) && (g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getRenderWidth(text1) > ox - pic_offx - 2*OFFSET_INNER_MID));
|
|
||||||
if (epgData.title.length() > text1.length()) // shold never be false in this place
|
|
||||||
text2 = epgData.title.substr(text1.length()+ 1, uint(-1) );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!topboxheight)
|
if (!topboxheight)
|
||||||
start();
|
start();
|
||||||
|
|
||||||
if (!text2.empty())
|
|
||||||
toph = 2 * topboxheight;
|
|
||||||
|
|
||||||
sb = oy - toph - botboxheight;
|
sb = oy - toph - botboxheight;
|
||||||
|
|
||||||
// 21.07.2005 - rainerk
|
// 21.07.2005 - rainerk
|
||||||
@@ -869,61 +839,65 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
COSDFader fader(g_settings.theme.menu_Content_alpha);
|
COSDFader fader(g_settings.theme.menu_Content_alpha);
|
||||||
fader.StartFadeIn();
|
fader.StartFadeIn();
|
||||||
|
|
||||||
//show the epg
|
// show the epg
|
||||||
// header + logo
|
// header + logo
|
||||||
int header_h = std::max(toph, logo_h);
|
if (header) {
|
||||||
if (!header){
|
header->kill();
|
||||||
header = new CComponentsShapeSquare(sx, sy, ox, header_h);
|
delete header;
|
||||||
header->setCorner(RADIUS_LARGE, CORNER_TOP);
|
header = NULL;
|
||||||
}
|
}
|
||||||
header->setDimensionsAll(sx, sy, ox, header_h);
|
|
||||||
|
header = new CComponentsHeader(sx, sy, ox, toph);
|
||||||
|
header->setCorner(RADIUS_LARGE, CORNER_TOP);
|
||||||
|
header->setDimensionsAll(sx, sy, ox, toph);
|
||||||
header->setColorBody(COL_MENUHEAD_PLUS_0);
|
header->setColorBody(COL_MENUHEAD_PLUS_0);
|
||||||
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0, g_settings.theme.menu_Head_gradient_direction);
|
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0, g_settings.theme.menu_Head_gradient_direction);
|
||||||
|
|
||||||
CComponentsPicture* headerPic = NULL; //NOTE: class CComponentsChannelLogo is preferred for channel logos
|
header->enableClock(true, "%H:%M", "%H.%M", true);
|
||||||
if (pic_offx > 0) {
|
header->getClockObject()->setCorner(RADIUS_LARGE, CORNER_TOP_RIGHT);
|
||||||
headerPic = new CComponentsPicture(sx + OFFSET_INNER_MID, sy + (header_h-logo_h)/2, logo_w, logo_h, lname);
|
|
||||||
headerPic->doPaintBg(false);
|
header->getChannelLogoObject()->hide();
|
||||||
}
|
header->setChannelLogo(channel_id, channel_name);
|
||||||
std::string textAll = (!text2.empty()) ? text1 + "\n" + text2 : text1;
|
|
||||||
CComponentsText headerText(sx + OFFSET_INNER_MID + pic_offx, sy, ox - 2*OFFSET_INNER_MID - pic_offx, header_h, textAll, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]);
|
header->setCaption(epgData.title);
|
||||||
headerText.doPaintBg(false);
|
|
||||||
headerText.setTextColor(COL_MENUHEAD_TEXT);
|
|
||||||
header->paint(CC_SAVE_SCREEN_NO);
|
header->paint(CC_SAVE_SCREEN_NO);
|
||||||
headerText.paint(CC_SAVE_SCREEN_NO);
|
|
||||||
if (headerPic)
|
|
||||||
headerPic->paint(CC_SAVE_SCREEN_NO);
|
|
||||||
|
|
||||||
int showPos = 0;
|
int showPos = 0;
|
||||||
textCount = epgText.size();
|
textCount = epgText.size();
|
||||||
showText(showPos, sy + toph);
|
showText(showPos, sy + toph);
|
||||||
|
|
||||||
// small bottom box
|
// small bottom box
|
||||||
frameBuffer->paintBoxRel(sx, sy+oy-botboxheight, ox, botboxheight, COL_MENUHEAD_PLUS_0);
|
CComponentsFrmChain *Bottombox = new CComponentsFrmChain(sx, sy+oy-botboxheight, ox, botboxheight);
|
||||||
|
Bottombox->setColorBody(COL_MENUHEAD_PLUS_0);
|
||||||
|
|
||||||
if (!mp_info)
|
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 + OFFSET_INNER_MID;
|
|
||||||
|
|
||||||
std::string fromto = epg_start + " - " + epg_end;
|
std::string fromto = epg_start + " - " + epg_end;
|
||||||
|
int x_off = OFFSET_INNER_MID;
|
||||||
int widthl = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(fromto);
|
int mid_width = ox * 40 / 100; // 40%
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+OFFSET_INNER_MID+io, sy+oy-3, widthl, fromto, COL_MENUHEAD_TEXT);
|
int side_width = ((ox - mid_width) / 2) - (2 * x_off);
|
||||||
int widthr = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(epg_date);
|
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ox-OFFSET_INNER_MID-io-widthr, sy+oy-3, widthr, epg_date, COL_MENUHEAD_TEXT);
|
|
||||||
|
|
||||||
GetPrevNextEPGData(epgData.eventID, &epgData.epg_times.startzeit);
|
GetPrevNextEPGData(epgData.eventID, &epgData.epg_times.startzeit);
|
||||||
if (!call_fromfollowlist)
|
|
||||||
{
|
CComponentsPictureScalable *lpic = new CComponentsPictureScalable(x_off,CC_CENTERED,NEUTRINO_ICON_BUTTON_LEFT);
|
||||||
int iy = sy + oy - botboxheight + (botboxheight - iw)/2;
|
CComponentsText *lText = new CComponentsText(x_off + lpic->getWidth() + OFFSET_INNER_MID, CC_CENTERED, side_width, toph, fromto, CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE], CComponentsText::FONT_STYLE_REGULAR, Bottombox, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||||
if (prev_id)
|
if ((prev_id) && (!call_fromfollowlist))
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_LEFT, sx + OFFSET_INNER_MID, iy);
|
Bottombox->addCCItem(lpic);
|
||||||
if (next_id)
|
lpic->doPaintBg(false);
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RIGHT, sx + ox - iw - OFFSET_INNER_MID, iy);
|
lText->doPaintBg(false);
|
||||||
}
|
|
||||||
|
CComponentsPictureScalable *rpic = new CComponentsPictureScalable(0,CC_CENTERED,NEUTRINO_ICON_BUTTON_RIGHT,Bottombox);
|
||||||
|
int x_pos = ox - rpic->getWidth() - OFFSET_INNER_MID;
|
||||||
|
if ((next_id) && (!call_fromfollowlist))
|
||||||
|
Bottombox->addCCItem(rpic);
|
||||||
|
rpic->setXPos(x_pos);
|
||||||
|
CComponentsText *rText = new CComponentsText(0, CC_CENTERED, side_width, toph, epg_date, CTextBox::NO_AUTO_LINEBREAK | CTextBox::RIGHT, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE], CComponentsText::FONT_STYLE_REGULAR, Bottombox, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||||
|
rText->setXPos(x_pos - OFFSET_INNER_MID - rText->getWidth());
|
||||||
|
rpic->doPaintBg(false);
|
||||||
|
rText->doPaintBg(false);
|
||||||
|
|
||||||
|
Bottombox->paint(false);
|
||||||
}
|
}
|
||||||
showProgressBar();
|
showProgressBar();
|
||||||
|
|
||||||
@@ -1300,8 +1274,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
if(epgTextSwitchClear)
|
if(epgTextSwitchClear)
|
||||||
epgTextSwitch.clear();
|
epgTextSwitch.clear();
|
||||||
}
|
}
|
||||||
if (headerPic)
|
|
||||||
delete headerPic;
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1314,6 +1286,12 @@ void CEpgData::hide()
|
|||||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIGFONT_FACTOR));
|
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIGFONT_FACTOR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (header) {
|
||||||
|
header->kill();
|
||||||
|
delete header;
|
||||||
|
header = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy);
|
frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy);
|
||||||
showTimerEventBar (false);
|
showTimerEventBar (false);
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,7 @@ class CEpgData
|
|||||||
CChannelEventList evtlist;
|
CChannelEventList evtlist;
|
||||||
CChannelEventList followlist;
|
CChannelEventList followlist;
|
||||||
CEPGData epgData;
|
CEPGData epgData;
|
||||||
CComponentsShapeSquare* header;
|
CComponentsHeader* header;
|
||||||
std::string epg_date;
|
std::string epg_date;
|
||||||
std::string epg_start;
|
std::string epg_start;
|
||||||
std::string epg_end;
|
std::string epg_end;
|
||||||
|
@@ -291,8 +291,10 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
|
|||||||
fwidth1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth("DDD, :, ") + 4 * g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getMaxDigitWidth();
|
fwidth1 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth("DDD, :, ") + 4 * g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getMaxDigitWidth();
|
||||||
//fwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth("[ ] ") + 3 * g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getMaxDigitWidth() + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(unit_short_minute);
|
//fwidth2 = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth("[ ] ") + 3 * g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getMaxDigitWidth() + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL]->getRenderWidth(unit_short_minute);
|
||||||
|
|
||||||
listmaxshow = (height-theight-iheight-0)/fheight;
|
botboxheight = fheight1+2*OFFSET_INNER_MIN;
|
||||||
height = theight+iheight+0+listmaxshow*fheight; // recalc height
|
|
||||||
|
listmaxshow = (height-theight-iheight-botboxheight-0)/fheight;
|
||||||
|
height = theight+iheight+botboxheight+0+listmaxshow*fheight; // recalc height
|
||||||
y = getScreenStartY(height);
|
y = getScreenStartY(height);
|
||||||
|
|
||||||
// calculate width of right info_zone
|
// calculate width of right info_zone
|
||||||
@@ -804,6 +806,9 @@ void CEventList::paintItem(unsigned int pos, t_channel_id channel_idI)
|
|||||||
|
|
||||||
// paint 2nd line text
|
// paint 2nd line text
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]->RenderString(x + iw + OFFSET_INNER_MID, ypos + fheight, width - iw - 2*OFFSET_INNER_MID, evtlist[currpos].description, color);
|
g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]->RenderString(x + iw + OFFSET_INNER_MID, ypos + fheight, width - iw - 2*OFFSET_INNER_MID, evtlist[currpos].description, color);
|
||||||
|
|
||||||
|
if (i_radius)
|
||||||
|
showProgressBar(currpos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -847,57 +852,90 @@ void CEventList::paintDescription(int index)
|
|||||||
|
|
||||||
void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, std::string _channelname_prev, std::string _channelname_next)
|
void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, std::string _channelname_prev, std::string _channelname_next)
|
||||||
{
|
{
|
||||||
int font_mid = SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE;
|
if (header) {
|
||||||
int font_lr = SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE;
|
header->kill();
|
||||||
|
delete header;
|
||||||
|
header = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!header)
|
header = new CComponentsHeader();
|
||||||
header = new CComponentsFrmChain();
|
|
||||||
|
|
||||||
header->setDimensionsAll(x, y, full_width, theight);
|
header->setDimensionsAll(x, y, full_width, theight);
|
||||||
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0, g_settings.theme.menu_Head_gradient_direction);
|
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0, g_settings.theme.menu_Head_gradient_direction);
|
||||||
header->setCorner(RADIUS_LARGE, CORNER_TOP);
|
header->setCorner(RADIUS_LARGE, CORNER_TOP);
|
||||||
header->clear();
|
|
||||||
|
|
||||||
|
header->enableClock(true, "%H:%M", "%H.%M", true);
|
||||||
|
header->getClockObject()->setCorner(RADIUS_LARGE, CORNER_TOP_RIGHT);
|
||||||
|
|
||||||
|
header->getChannelLogoObject()->hide();
|
||||||
|
header->setChannelLogo(_channel_id,_channelname);
|
||||||
|
header->setCaption(_channelname,CTextBox::CENTER);
|
||||||
|
|
||||||
|
header->paint(CC_SAVE_SCREEN_NO);
|
||||||
|
paintBottomBox(_channelname_prev, _channelname_next);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEventList::paintBottomBox(std::string _channelname_prev, std::string _channelname_next)
|
||||||
|
{
|
||||||
|
int by = y + height - iheight - botboxheight;
|
||||||
|
int font_lr = SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE;
|
||||||
int x_off = OFFSET_INNER_MID;
|
int x_off = OFFSET_INNER_MID;
|
||||||
int mid_width = full_width * 40 / 100; // 40%
|
int mid_width = full_width * 40 / 100; // 40%
|
||||||
int max_height = theight - 2*OFFSET_INNER_MIN;
|
|
||||||
int side_width = ((full_width - mid_width) / 2) - (2 * x_off);
|
int side_width = ((full_width - mid_width) / 2) - (2 * x_off);
|
||||||
|
|
||||||
//create an logo object
|
CComponentsFrmChain *Bottombox = new CComponentsFrmChain(x, by, full_width, botboxheight);
|
||||||
CComponentsChannelLogoScalable* midLogo = new CComponentsChannelLogoScalable(0, 0, _channelname, _channel_id, header);
|
Bottombox->setColorBody(COL_MENUHEAD_PLUS_0);
|
||||||
if (midLogo->hasLogo())
|
|
||||||
{
|
|
||||||
midLogo->setWidth(min(midLogo->getWidth(), mid_width), true);
|
|
||||||
if (midLogo->getHeight() > max_height)
|
|
||||||
midLogo->setHeight(max_height, true);
|
|
||||||
|
|
||||||
midLogo->setPos(CC_CENTERED, CC_CENTERED);
|
|
||||||
|
|
||||||
// recalc widths
|
|
||||||
side_width = ((full_width - midLogo->getWidth()) / 2) - (4 * x_off);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
header->removeCCItem(midLogo); //remove/destroy logo object, if it is not available
|
|
||||||
int w_midText = g_Font[font_mid]->getRenderWidth(_channelname);
|
|
||||||
CComponentsText *midText = new CComponentsText(0, CC_CENTERED, w_midText, theight, _channelname, CTextBox::CENTER, g_Font[font_mid], CComponentsText::FONT_STYLE_REGULAR, header, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
|
||||||
midText->setXPos(full_width/2 - midText->getWidth()/2);
|
|
||||||
midText->doPaintBg(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_channelname_prev.empty()) {
|
if (!_channelname_prev.empty()) {
|
||||||
CComponentsText *lText = new CComponentsText(x_off, CC_CENTERED, side_width, theight, _channelname_prev, CTextBox::NO_AUTO_LINEBREAK, g_Font[font_lr], CComponentsText::FONT_STYLE_REGULAR, header, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
CComponentsPictureScalable *lpic = new CComponentsPictureScalable(x_off,CC_CENTERED,NEUTRINO_ICON_BUTTON_LEFT,Bottombox);
|
||||||
|
CComponentsText *lText = new CComponentsText(x_off + lpic->getWidth() + OFFSET_INNER_MID, CC_CENTERED, side_width, theight, _channelname_prev, CTextBox::NO_AUTO_LINEBREAK, g_Font[font_lr], CComponentsText::FONT_STYLE_REGULAR, Bottombox, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||||
|
lpic->doPaintBg(false);
|
||||||
lText->doPaintBg(false);
|
lText->doPaintBg(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_channelname_next.empty()) {
|
if (!_channelname_next.empty()) {
|
||||||
int x_pos = full_width - side_width - x_off;
|
CComponentsPictureScalable *rpic = new CComponentsPictureScalable(0,CC_CENTERED,NEUTRINO_ICON_BUTTON_RIGHT,Bottombox);
|
||||||
CComponentsText *rText = new CComponentsText(x_pos, CC_CENTERED, side_width, theight, _channelname_next, CTextBox::NO_AUTO_LINEBREAK | CTextBox::RIGHT, g_Font[font_lr], CComponentsText::FONT_STYLE_REGULAR, header, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
int x_pos = full_width - rpic->getWidth() - OFFSET_INNER_MID;
|
||||||
|
rpic->setXPos(x_pos);
|
||||||
|
CComponentsText *rText = new CComponentsText(0, CC_CENTERED, side_width, theight, _channelname_next, CTextBox::NO_AUTO_LINEBREAK | CTextBox::RIGHT, g_Font[font_lr], CComponentsText::FONT_STYLE_REGULAR, Bottombox, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||||
|
rText->setXPos(x_pos - OFFSET_INNER_MID - rText->getWidth());
|
||||||
|
rpic->doPaintBg(false);
|
||||||
rText->doPaintBg(false);
|
rText->doPaintBg(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (header->isPainted()) //clean up background of header for new captions
|
Bottombox->paint(false);
|
||||||
header->kill(header->getColorBody());
|
}
|
||||||
header->paint(CC_SAVE_SCREEN_NO);
|
|
||||||
|
void CEventList::showProgressBar(int pos)
|
||||||
|
{
|
||||||
|
int epg_done= -1;
|
||||||
|
if ((( time(NULL)- evtlist[pos].startTime )>= 0 ) && (evtlist[pos].duration > 0))
|
||||||
|
{
|
||||||
|
unsigned nProcentagePassed = ((time(NULL) - evtlist[pos].startTime) * 100 / evtlist[pos].duration);
|
||||||
|
if (nProcentagePassed<= 100)
|
||||||
|
epg_done= nProcentagePassed;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pbw = 104;
|
||||||
|
int pbx = x + (full_width - pbw)/2;
|
||||||
|
int pbh = botboxheight - 12;
|
||||||
|
int pby = y + height -iheight - botboxheight + (botboxheight - pbh)/2;
|
||||||
|
|
||||||
|
//show progressbar
|
||||||
|
if (epg_done != -1)
|
||||||
|
{
|
||||||
|
CProgressBar pb(pbx, pby, pbw, pbh);
|
||||||
|
pb.setType(CProgressBar::PB_TIMESCALE);
|
||||||
|
pb.setValues(epg_done, 100);
|
||||||
|
pb.paint(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CComponentsShapeSquare pb(pbx, pby, pbw, pbh);
|
||||||
|
pb.setColorBody(COL_MENUHEAD_PLUS_0);
|
||||||
|
pb.paint(false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEventList::paint(t_channel_id channel_id)
|
void CEventList::paint(t_channel_id channel_id)
|
||||||
@@ -998,7 +1036,6 @@ void CEventList::showFunctionBar(t_channel_id channel_id)
|
|||||||
buttons[btn_cnt].locale = LOCALE_EPGMENU_EVENTINFO;
|
buttons[btn_cnt].locale = LOCALE_EPGMENU_EVENTINFO;
|
||||||
btn_cnt++;
|
btn_cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
::paintButtons(bx, by, bw, btn_cnt, buttons, bw, bh);
|
::paintButtons(bx, by, bw, btn_cnt, buttons, bw, bh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -95,6 +95,7 @@ class CEventList : public CListHelpers
|
|||||||
std::string search_head_name;
|
std::string search_head_name;
|
||||||
|
|
||||||
int full_width, width, infozone_width;
|
int full_width, width, infozone_width;
|
||||||
|
int botboxheight;
|
||||||
int height;
|
int height;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
@@ -102,13 +103,15 @@ class CEventList : public CListHelpers
|
|||||||
int sort_mode;
|
int sort_mode;
|
||||||
event_id_t item_event_ID;
|
event_id_t item_event_ID;
|
||||||
CComponentsText *cc_infozone;
|
CComponentsText *cc_infozone;
|
||||||
CComponentsFrmChain *header;
|
CComponentsHeader *header;
|
||||||
const char * unit_short_minute;
|
const char * unit_short_minute;
|
||||||
|
|
||||||
void paintItem(unsigned pos, t_channel_id channel_id = 0);
|
void paintItem(unsigned pos, t_channel_id channel_id = 0);
|
||||||
void paintDescription(int index);
|
void paintDescription(int index);
|
||||||
void paint(t_channel_id channel_id = 0);
|
void paint(t_channel_id channel_id = 0);
|
||||||
void paintHead(t_channel_id _channel_id, std::string _channelname, std::string _channelname_prev = "", std::string _channelname_next = "");
|
void paintHead(t_channel_id _channel_id, std::string _channelname, std::string _channelname_prev = "", std::string _channelname_next = "");
|
||||||
|
void paintBottomBox(std::string _channelname_prev, std::string _channelname_next);
|
||||||
|
void showProgressBar(int pos);
|
||||||
void hide();
|
void hide();
|
||||||
void showFunctionBar(t_channel_id channel_id);
|
void showFunctionBar(t_channel_id channel_id);
|
||||||
|
|
||||||
|
@@ -2095,6 +2095,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
|
|||||||
{
|
{
|
||||||
if (m_movieSelectionHandler != NULL)
|
if (m_movieSelectionHandler != NULL)
|
||||||
{
|
{
|
||||||
|
m_header->getClockObject()->kill();
|
||||||
framebuffer->paintBackground(); //clear whole screen
|
framebuffer->paintBackground(); //clear whole screen
|
||||||
g_EpgData->show_mp(m_movieSelectionHandler);
|
g_EpgData->show_mp(m_movieSelectionHandler);
|
||||||
refresh();
|
refresh();
|
||||||
|
Reference in New Issue
Block a user