mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
* src/gui/channellist.cpp: miniTV osd fix
- Screen coordinate x could possibly receive a value under 0
This commit is contained in:
@@ -94,6 +94,8 @@ extern int old_b_id;
|
||||
|
||||
extern cVideo * videoDecoder;
|
||||
|
||||
#define ConnectLineBox_Width 16
|
||||
|
||||
CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist, bool )
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
@@ -465,9 +467,6 @@ void CChannelList::calcSize()
|
||||
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth();
|
||||
width = w_max (((g_settings.channellist_extended)?(frameBuffer->getScreenWidth() / 20 * (fw+6)):(frameBuffer->getScreenWidth() / 20 * (fw+5))), 100);
|
||||
widthDetails = width;
|
||||
if (g_settings.channellist_minitv){
|
||||
widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX();
|
||||
}
|
||||
height = h_max ((frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20 * 2));
|
||||
if (g_settings.channellist_minitv)
|
||||
height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), 0);
|
||||
@@ -505,11 +504,14 @@ void CChannelList::calcSize()
|
||||
if (g_settings.channellist_minitv)
|
||||
{
|
||||
width = frameBuffer->getScreenWidth() / 3 * 2;
|
||||
widthDetails = frameBuffer->getScreenWidth() - frameBuffer->getScreenX() - 2*ConnectLineBox_Width;
|
||||
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - widthDetails) / 2;
|
||||
if (x < ConnectLineBox_Width)
|
||||
x = ConnectLineBox_Width;
|
||||
y = frameBuffer->getScreenY();
|
||||
pig_width = widthDetails / 3 - 16;
|
||||
pig_height = pig_width / 16 * 9;
|
||||
// infozone_width = pig_width - 8;
|
||||
infozone_width = widthDetails - width;
|
||||
pig_width = infozone_width;
|
||||
pig_height = (pig_width * 9) / 16;
|
||||
infozone_height = height - theight - pig_height;
|
||||
}
|
||||
else
|
||||
@@ -1602,8 +1604,6 @@ void CChannelList::clearItem2DetailsLine()
|
||||
|
||||
void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
||||
{
|
||||
#define ConnectLineBox_Width 16
|
||||
|
||||
int xpos = x - ConnectLineBox_Width;
|
||||
int ypos1 = y + theight+0 + pos*fheight;
|
||||
int ypos2 = y + height;
|
||||
@@ -2099,7 +2099,7 @@ void CChannelList::paint_pig (int _x, int _y, int w, int h)
|
||||
void CChannelList::paint_events(int index)
|
||||
{
|
||||
readEvents(chanlist[index]->channel_id);
|
||||
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, widthDetails - width, infozone_height,COL_MENUHEAD_PLUS_0);
|
||||
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUHEAD_PLUS_0);
|
||||
|
||||
char text1[10];
|
||||
CChannelEventList::iterator e;
|
||||
@@ -2143,7 +2143,7 @@ void CChannelList::paint_events(int index)
|
||||
if ((y+ theight+ pig_height + i*ffheight) < (y+ height))
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, timewidth, text1, COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5+timewidth+5, y+ theight+ pig_height + i*ffheight, widthDetails - width - timewidth - 20, e->description, COL_MENUCONTENTDARK, 0, true);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5+timewidth+5, y+ theight+ pig_height + i*ffheight, infozone_width - timewidth - 20, e->description, COL_MENUCONTENTDARK, 0, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user