mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
- streaminfo: use OFFSET defines; some position fixes
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -419,7 +419,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
{
|
{
|
||||||
if (cnt < 12)
|
if (cnt < 12)
|
||||||
cnt++;
|
cnt++;
|
||||||
int dx1 = x + 10;
|
int dx1 = x + OFFSET_INNER_MID;
|
||||||
|
|
||||||
if (!mp && delay_counter > delay + 1)
|
if (!mp && delay_counter > delay + 1)
|
||||||
{
|
{
|
||||||
@@ -586,16 +586,16 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h)
|
|||||||
else
|
else
|
||||||
tname += to_string(1 + frontend->getNumber()) + ": " + frontend->getName();
|
tname += to_string(1 + frontend->getNumber()) + ": " + frontend->getName();
|
||||||
|
|
||||||
g_Font[font_small]->RenderString(_x, _y+iheight+15, width-_x-10, tname /*tuner_name.c_str()*/, COL_MENUCONTENT_TEXT);
|
g_Font[font_small]->RenderString(_x, _y + iheight, width - _x - OFFSET_INNER_MID, tname /*tuner_name.c_str()*/, COL_MENUCONTENT_TEXT);
|
||||||
|
|
||||||
sigBox_x = _x;
|
sigBox_x = _x;
|
||||||
sigBox_y = _y+iheight+15;
|
sigBox_y = _y + iheight + OFFSET_INNER_MID;
|
||||||
sigBox_w = w;
|
sigBox_w = w;
|
||||||
sigBox_h = h-iheight*3;
|
sigBox_h = h - iheight - OFFSET_INNER_MID;
|
||||||
frameBuffer->paintBoxRel(sigBox_x,sigBox_y,sigBox_w+2,sigBox_h, COL_BLACK);
|
frameBuffer->paintBoxRel(sigBox_x, sigBox_y, sigBox_w, sigBox_h, COL_BLACK);
|
||||||
sig_text_y = sigBox_y + sigBox_h;
|
sig_text_y = sigBox_y + sigBox_h + OFFSET_INNER_SMALL;
|
||||||
|
|
||||||
int y1 = sig_text_y + sheight+4;
|
int y1 = sig_text_y + sheight + OFFSET_INNER_SMALL;
|
||||||
int fw = g_Font[font_small]->getWidth();
|
int fw = g_Font[font_small]->getWidth();
|
||||||
|
|
||||||
int maxmin_x; // x-position of min and max
|
int maxmin_x; // x-position of min and max
|
||||||
@@ -616,27 +616,27 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h)
|
|||||||
col = 1;
|
col = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight + 1) +5, fw*3, "max", COL_MENUCONTENT_TEXT);
|
g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 1) +OFFSET_INNER_SMALL, fw*3, "max", COL_MENUCONTENT_TEXT);
|
||||||
g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 2) +5, fw*3, "now", COL_MENUCONTENT_TEXT);
|
g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 2) +OFFSET_INNER_SMALL, fw*3, "now", COL_MENUCONTENT_TEXT);
|
||||||
g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 3) +5, fw*3, "min", COL_MENUCONTENT_TEXT);
|
g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 3) +OFFSET_INNER_SMALL, fw*3, "min", COL_MENUCONTENT_TEXT);
|
||||||
|
|
||||||
if (!mp)
|
if (!mp)
|
||||||
{
|
{
|
||||||
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*8, "BER [%]", COL_RED);
|
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*8, "BER [%]", COL_RED);
|
||||||
sig_text_ber_x = _x + 5 + xd * col;
|
sig_text_ber_x = _x + OFFSET_INNER_SMALL + xd * col;
|
||||||
col++;
|
col++;
|
||||||
|
|
||||||
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*8, "SNR [%]", COL_LIGHT_BLUE);
|
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*8, "SNR [%]", COL_LIGHT_BLUE);
|
||||||
sig_text_snr_x = _x + 5 + xd * col;
|
sig_text_snr_x = _x + OFFSET_INNER_SMALL + xd * col;
|
||||||
col++;
|
col++;
|
||||||
|
|
||||||
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*8, "SIG [%]", COL_GREEN);
|
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*8, "SIG [%]", COL_GREEN);
|
||||||
sig_text_sig_x = _x + 5 + xd * col;
|
sig_text_sig_x = _x + OFFSET_INNER_SMALL + xd * col;
|
||||||
col++;
|
col++;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*10, "BR [kbps]", COL_YELLOW);
|
g_Font[font_small]->RenderString(_x+xd*col, y1, fw*10, "BR [kbps]", COL_YELLOW);
|
||||||
sig_text_rate_x = _x + 5 + xd * col;
|
sig_text_rate_x = _x + OFFSET_INNER_SMALL + xd * col;
|
||||||
|
|
||||||
sigBox_pos = 0;
|
sigBox_pos = 0;
|
||||||
|
|
||||||
@@ -648,7 +648,7 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h)
|
|||||||
void CStreamInfo2::paint_signal_fe(struct bitrate br, struct feSignal s)
|
void CStreamInfo2::paint_signal_fe(struct bitrate br, struct feSignal s)
|
||||||
{
|
{
|
||||||
int x_now = sigBox_pos;
|
int x_now = sigBox_pos;
|
||||||
int yt = sig_text_y + (sheight *2)+4;
|
int yt = sig_text_y + (sheight *2) + OFFSET_INNER_SMALL;
|
||||||
int yd;
|
int yd;
|
||||||
static int old_x=0, old_y=0;
|
static int old_x=0, old_y=0;
|
||||||
sigBox_pos++;
|
sigBox_pos++;
|
||||||
@@ -740,9 +740,9 @@ void CStreamInfo2::SignalRenderStr(unsigned int value, int _x, int _y)
|
|||||||
char str[30];
|
char str[30];
|
||||||
int fw = g_Font[font_small]->getWidth();
|
int fw = g_Font[font_small]->getWidth();
|
||||||
fw *=(fw>17)?5:6;
|
fw *=(fw>17)?5:6;
|
||||||
frameBuffer->paintBoxRel(_x, _y - sheight + 5, fw, sheight -1, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(_x, _y - sheight + OFFSET_INNER_SMALL, fw, sheight -1, COL_MENUCONTENT_PLUS_0);
|
||||||
sprintf(str,"%6u",value);
|
sprintf(str,"%6u",value);
|
||||||
g_Font[font_small]->RenderString(_x, _y + 5, fw, str, COL_MENUCONTENT_TEXT);
|
g_Font[font_small]->RenderString(_x, _y + OFFSET_INNER_SMALL, fw, str, COL_MENUCONTENT_TEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStreamInfo2::paint (int /*mode*/)
|
void CStreamInfo2::paint (int /*mode*/)
|
||||||
@@ -753,8 +753,8 @@ void CStreamInfo2::paint (int /*mode*/)
|
|||||||
height = frameBuffer->getScreenHeight();
|
height = frameBuffer->getScreenHeight();
|
||||||
x = frameBuffer->getScreenX();
|
x = frameBuffer->getScreenX();
|
||||||
y = frameBuffer->getScreenY();
|
y = frameBuffer->getScreenY();
|
||||||
int ypos = y + 5;
|
int ypos = y + OFFSET_INNER_SMALL;
|
||||||
int xpos = x + 10;
|
int xpos = x + OFFSET_INNER_MID;
|
||||||
|
|
||||||
if (paint_mode == 0)
|
if (paint_mode == 0)
|
||||||
{
|
{
|
||||||
@@ -764,18 +764,19 @@ void CStreamInfo2::paint (int /*mode*/)
|
|||||||
|
|
||||||
// paint backround, title pig, etc.
|
// paint backround, title pig, etc.
|
||||||
frameBuffer->paintBoxRel (0, 0, max_width, max_height, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel (0, 0, max_width, max_height, COL_MENUCONTENT_PLUS_0);
|
||||||
g_Font[font_head]->RenderString (xpos, ypos + hheight + 1, width, head_string, COL_MENUHEAD_TEXT);
|
g_Font[font_head]->RenderString (xpos, ypos + hheight, width, head_string, COL_MENUHEAD_TEXT);
|
||||||
ypos += hheight;
|
|
||||||
|
ypos += hheight + iheight;
|
||||||
|
|
||||||
if (pip == NULL)
|
if (pip == NULL)
|
||||||
pip = new CComponentsPIP(width-width/3-10, y+10, 33);
|
pip = new CComponentsPIP(width - width/3 - OFFSET_INNER_MID, y + OFFSET_INNER_MID, 33);
|
||||||
pip->paint(CC_SAVE_SCREEN_NO);
|
pip->paint(CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
techinfo_xpos = xpos;
|
techinfo_xpos = xpos;
|
||||||
techinfo_ypos = ypos;
|
techinfo_ypos = ypos;
|
||||||
|
|
||||||
paint_techinfo (xpos, ypos);
|
paint_techinfo (xpos, ypos);
|
||||||
paint_signal_fe_box (width - width/3 - 10, (y + 10 + height/3 + hheight), width/3, height/3 + hheight);
|
paint_signal_fe_box (width - width/3 - OFFSET_INNER_MID, (y + OFFSET_INNER_MID + height/3 + hheight), pip->getWidth(), height/3 + hheight);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -807,7 +808,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1, i = 0;
|
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1, i = 0;
|
||||||
// paint labels
|
// paint labels
|
||||||
int ypos1 = ypos;
|
int ypos1 = ypos;
|
||||||
box_width = width*2/3 - 10 - xpos;
|
box_width = width*2/3 - OFFSET_INNER_MID - xpos;
|
||||||
|
|
||||||
yypos = ypos;
|
yypos = ypos;
|
||||||
if (box_h > 0)
|
if (box_h > 0)
|
||||||
@@ -1490,13 +1491,16 @@ int CStreamInfo2::ts_close ()
|
|||||||
|
|
||||||
void CStreamInfo2::showSNR()
|
void CStreamInfo2::showSNR()
|
||||||
{
|
{
|
||||||
|
int _h = 2*iheight;
|
||||||
|
//int _y = sig_text_y + 4*sheight + 3*OFFSET_INNER_SMALL;
|
||||||
|
int _y = y + height - OFFSET_INNER_MID - _h;
|
||||||
|
|
||||||
if (signalbox == NULL)
|
if (signalbox == NULL)
|
||||||
{
|
{
|
||||||
signalbox = new CSignalBox(width - width/3 - 10, y + 10 + 2*(height/3 + hheight) + 3*sheight, width/3, 2*iheight, frontend);
|
signalbox = new CSignalBox(width - width/3 - OFFSET_INNER_MID, _y, pip->getWidth(), _h, frontend);
|
||||||
signalbox->setColorBody(COL_MENUCONTENT_PLUS_0);
|
signalbox->setColorBody(COL_MENUCONTENT_PLUS_0);
|
||||||
signalbox->setTextColor(COL_MENUCONTENT_TEXT);
|
signalbox->setTextColor(COL_MENUCONTENT_TEXT);
|
||||||
signalbox->doPaintBg(true);
|
signalbox->doPaintBg(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
signalbox->paint(false);
|
signalbox->paint(false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user