Merge remote-tracking branch 'tuxbox/master'

* needs compile fixes
* needs additional tests, of course :-)
This commit is contained in:
Stefan Seyfried
2016-10-22 11:37:40 +02:00
346 changed files with 13372 additions and 6088 deletions

View File

@@ -413,7 +413,7 @@ int CBouquetList::show(bool bShowChannelList)
favonly = !bShowChannelList;
for(unsigned int count = 0; count < sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]);count++){
int w_text = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(CBouquetListButtons[count].locale));
int w_text = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(g_Locale->getText(CBouquetListButtons[count].locale));
w_max_text = std::max(w_max_text, w_text);
frameBuffer->getIconSize(CBouquetListButtons[count].button, &icol_w, &icol_h);
w_max_icon = std::max(w_max_icon, icol_w);
@@ -427,7 +427,7 @@ int CBouquetList::show(bool bShowChannelList)
width = w_max (need_width, 20);
height = h_max (16 * fheight, 40);
footerHeight = std::max(h_max_icon+8, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8);
footerHeight = std::max(h_max_icon+8, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+8);
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
listmaxshow = (height - theight - footerHeight)/fheight;
height = theight + footerHeight + listmaxshow * fheight; // recalc height
@@ -501,6 +501,12 @@ int CBouquetList::show(bool bShowChannelList)
hide();
return CHANLIST_CHANGE_MODE;
}
} else if(msg == CRCInput::RC_www) {
if(!favonly && bShowChannelList && CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_WEBTV) {
CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_WEBTV);
hide();
return CHANLIST_CHANGE_MODE;
}
}
else if ( msg == CRCInput::RC_setup) {
if (!favonly && !Bouquets.empty()) {
@@ -612,27 +618,44 @@ void CBouquetList::hide()
void CBouquetList::paintItem(int pos)
{
int ypos = y+ theight+0 + pos*fheight;
fb_pixel_t color;
fb_pixel_t bgcolor;
bool iscurrent = true;
int npos = liststart + pos;
const char * lname = NULL;
if(npos < (int) Bouquets.size())
bool i_selected = npos == (int) selected;
int i_radius = RADIUS_NONE;
fb_pixel_t color;
fb_pixel_t bgcolor;
getItemColors(color, bgcolor, i_selected);
if (i_selected)
i_radius = RADIUS_LARGE;
if (i_radius)
frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor);
frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, i_radius);
if (npos < (int) Bouquets.size())
lname = (Bouquets[npos]->zapitBouquet && Bouquets[npos]->zapitBouquet->bFav) ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : Bouquets[npos]->channelList->getName();
if (npos == (int) selected) {
color = COL_MENUCONTENTSELECTED_TEXT;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, RADIUS_LARGE);
if (i_selected)
{
if(npos < (int) Bouquets.size())
CVFD::getInstance()->showMenuText(0, lname, -1, true);
} else {
}
else
{
if(!favonly && (npos < (int) Bouquets.size()))
iscurrent = !Bouquets[npos]->channelList->isEmpty();
color = iscurrent ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT;
bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0;
frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor);
if (!iscurrent)
{
//inactive colors? Is this correct?
color = COL_MENUCONTENTINACTIVE_TEXT;
//bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
}
}
if(npos < (int) Bouquets.size()) {
@@ -698,7 +721,7 @@ void CBouquetList::paint()
::paintButtons(x, y + (height - footerHeight), width, numbuttons, CBouquetListButtons, width, footerHeight);
#endif
if (favonly)
frameBuffer->paintBoxRel(x, y + (height - footerHeight), width, footerHeight, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM); //round
frameBuffer->paintBoxRel(x, y + (height - footerHeight), width, footerHeight, COL_MENUFOOT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); //round
else
::paintButtons(x, y + (height - footerHeight), width, numbuttons, CBouquetListButtons, width, footerHeight);
@@ -711,10 +734,10 @@ void CBouquetList::paint()
int ypos = y+ theight;
int sb = fheight* listmaxshow;
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0);
int listmaxshow_tmp = listmaxshow ? listmaxshow : 1;//avoid division by zero
int sbc= ((bsize - 1)/ listmaxshow_tmp)+ 1; /* bsize is > 0, so sbc is also > 0 */
int sbs= (selected/listmaxshow_tmp);
int sbc= ((bsize - 1)/ listmaxshow)+ 1; /* bsize is > 0, so sbc is also > 0 */
int sbs= (selected/listmaxshow);
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_SCROLLBAR_ACTIVE_PLUS_0);
}