mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
Merge branch 'pu/cc' into next-cc
Conflicts: acinclude.m4 data/locale/deutsch.locale data/locale/english.locale src/driver/volume.cpp src/eitd/SIlanguage.cpp src/gui/bedit/bouqueteditor_channels.cpp src/gui/bedit/bouqueteditor_chanselect.cpp src/gui/bouquetlist.cpp src/gui/channellist.cpp src/gui/eventlist.cpp src/gui/osd_setup.cpp src/gui/scan.cpp src/gui/scan.h src/gui/test_menu.cpp src/gui/timeosd.cpp src/gui/widget/progressbar.cpp src/gui/widget/progressbar.h src/neutrino.cpp src/nhttpd/yconfig.h
This commit is contained in:
@@ -72,18 +72,12 @@ CBEChannelSelectWidget::CBEChannelSelectWidget(const std::string & Caption, unsi
|
||||
liststart = 0;
|
||||
bouquetChannels = NULL;
|
||||
dline = NULL;
|
||||
ibox = NULL;
|
||||
ibox = new CComponentsInfoBox();
|
||||
}
|
||||
|
||||
CBEChannelSelectWidget::~CBEChannelSelectWidget()
|
||||
{
|
||||
// clear details line
|
||||
if (dline != NULL)
|
||||
dline->hide();
|
||||
delete dline;
|
||||
// clear infobox
|
||||
if (ibox != NULL)
|
||||
ibox->hide();
|
||||
delete ibox;
|
||||
}
|
||||
|
||||
@@ -119,7 +113,7 @@ void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool pselec
|
||||
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
|
||||
|
||||
if(itemNr < getItemCount()) {
|
||||
paintItem2DetailsLine (paintNr, itemNr);
|
||||
initItem2DetailsLine (paintNr, itemNr);
|
||||
paintDetails(itemNr);
|
||||
}
|
||||
|
||||
@@ -210,8 +204,10 @@ void CBEChannelSelectWidget::paintFoot()
|
||||
#endif
|
||||
}
|
||||
|
||||
void CBEChannelSelectWidget::paintDetails(int index)
|
||||
std::string CBEChannelSelectWidget::getInfoText(int index)
|
||||
{
|
||||
std::string res = "";
|
||||
|
||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(Channels[index]->getSatellitePosition());
|
||||
transponder t;
|
||||
CServiceManager::getInstance()->GetTransponder(Channels[index]->getTransponderId(), t);
|
||||
@@ -220,12 +216,25 @@ void CBEChannelSelectWidget::paintDetails(int index)
|
||||
desc = desc + " (" + std::string(Channels[index]->pname) + ")";
|
||||
else
|
||||
desc = desc + " (" + satname + ")";
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight+INFO_BOX_Y_OFFSET, width - 30, satname.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight+INFO_BOX_Y_OFFSET, width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true);
|
||||
|
||||
res = satname + "\n" + desc;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void CBEChannelSelectWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
void CBEChannelSelectWidget::paintDetails(int index)
|
||||
{
|
||||
//details line
|
||||
dline->paint();
|
||||
|
||||
std::string str = getInfoText(index);
|
||||
|
||||
//info box
|
||||
ibox->setText(str, CTextBox::AUTO_WIDTH | CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]);
|
||||
ibox->paint(false);
|
||||
}
|
||||
|
||||
void CBEChannelSelectWidget::initItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
{
|
||||
int xpos = x - ConnectLineBox_Width;
|
||||
int ypos1 = y + theight+0 + pos*fheight;
|
||||
@@ -233,26 +242,23 @@ void CBEChannelSelectWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
int ypos1a = ypos1 + (fheight/2)-2;
|
||||
int ypos2a = ypos2 + (info_height/2)-2;
|
||||
|
||||
// clear details line
|
||||
if (dline != NULL)
|
||||
dline->hide();
|
||||
if (dline)
|
||||
dline->kill(); //kill details line
|
||||
|
||||
// clear infobox
|
||||
if (ibox != NULL)
|
||||
ibox->hide();
|
||||
|
||||
// paint Line if detail info (and not valid list pos)
|
||||
// init Line if detail info (and not valid list pos)
|
||||
if (pos >= 0)
|
||||
{
|
||||
if (dline == NULL)
|
||||
dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
|
||||
dline->setYPos(ypos1a);
|
||||
dline->paint(false);
|
||||
|
||||
//infobox
|
||||
if (ibox == NULL)
|
||||
ibox = new CComponentsInfoBox(x, ypos2, width, info_height, false);
|
||||
ibox->paint(false,true);
|
||||
if (ibox){
|
||||
ibox->setDimensionsAll(x, ypos2, width, info_height);
|
||||
ibox->setFrameThickness(2);
|
||||
ibox->setCornerRadius(RADIUS_LARGE);
|
||||
ibox->setShadowOnOff(CC_SHADOW_OFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user