mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
src/gui/scan.cpp: Fix pixel error with transponder scan.
fix for13b041567f
Origin commit data ------------------ Branch: ni/coolstream Commit:874cf44b42
Author: Michael Liebmann <tuxcode.bbg@gmail.com> Date: 2013-08-17 (Sat, 17 Aug 2013) ------------------ This commit was generated by Migit
This commit is contained in:
@@ -394,7 +394,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY:
|
case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY:
|
||||||
freqready = 1;
|
freqready = 1;
|
||||||
sprintf(buffer, "%u", data);
|
sprintf(buffer, "%u", data);
|
||||||
xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true);
|
xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true)+2;
|
||||||
paintLine(xpos2, ypos_frequency, xpos_frequency, buffer);
|
paintLine(xpos2, ypos_frequency, xpos_frequency, buffer);
|
||||||
paintRadar();
|
paintRadar();
|
||||||
break;
|
break;
|
||||||
@@ -487,7 +487,7 @@ void CScanTs::hide()
|
|||||||
void CScanTs::paintLineLocale(int px, int * py, int pwidth, const neutrino_locale_t l)
|
void CScanTs::paintLineLocale(int px, int * py, int pwidth, const neutrino_locale_t l)
|
||||||
{
|
{
|
||||||
frameBuffer->paintBoxRel(px, *py, pwidth, mheight, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(px, *py, pwidth, mheight, COL_MENUCONTENT_PLUS_0);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px+2, *py + mheight, pwidth-2, g_Locale->getText(l), COL_MENUCONTENTINACTIVE_TEXT, 0, true); // UTF-8
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px+2, *py + mheight, pwidth, g_Locale->getText(l), COL_MENUCONTENTINACTIVE_TEXT, 0, true); // UTF-8
|
||||||
*py += mheight;
|
*py += mheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -495,7 +495,7 @@ void CScanTs::paintLine(int px, int py, int w, const char * const txt)
|
|||||||
{
|
{
|
||||||
//printf("CScanTs::paintLine x %d y %d w %d width %d xpos2 %d: %s\n", px, py, w, width, xpos2, txt);
|
//printf("CScanTs::paintLine x %d y %d w %d width %d xpos2 %d: %s\n", px, py, w, width, xpos2, txt);
|
||||||
frameBuffer->paintBoxRel(px, py, w, mheight, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(px, py, w, mheight, COL_MENUCONTENT_PLUS_0);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px+2, py + mheight, w-2, txt, COL_MENUCONTENT_TEXT, 0, true); // UTF-8
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px+2, py + mheight, w, txt, COL_MENUCONTENT_TEXT, 0, true); // UTF-8
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScanTs::paint(bool fortest)
|
void CScanTs::paint(bool fortest)
|
||||||
@@ -514,12 +514,12 @@ void CScanTs::paint(bool fortest)
|
|||||||
if(deltype == FE_QPSK)
|
if(deltype == FE_QPSK)
|
||||||
{ //sat
|
{ //sat
|
||||||
paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_ACTSATELLITE);
|
paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_ACTSATELLITE);
|
||||||
xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE), true); // UTF-8
|
xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTSATELLITE), true)+2; // UTF-8
|
||||||
}
|
}
|
||||||
if(deltype == FE_QAM)
|
if(deltype == FE_QAM)
|
||||||
{ //cable
|
{ //cable
|
||||||
paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_ACTCABLE);
|
paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_ACTCABLE);
|
||||||
xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTCABLE), true); // UTF-8
|
xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_SCANTS_ACTCABLE), true)+2; // UTF-8
|
||||||
}
|
}
|
||||||
|
|
||||||
ypos_transponder = ypos;
|
ypos_transponder = ypos;
|
||||||
@@ -550,7 +550,7 @@ void CScanTs::paint(bool fortest)
|
|||||||
|
|
||||||
int CScanTs::greater_xpos(int xpos, const neutrino_locale_t txt)
|
int CScanTs::greater_xpos(int xpos, const neutrino_locale_t txt)
|
||||||
{
|
{
|
||||||
int txt_xpos = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(txt), true); // UTF-8
|
int txt_xpos = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(txt), true)+2; // UTF-8
|
||||||
if (txt_xpos > xpos)
|
if (txt_xpos > xpos)
|
||||||
return txt_xpos;
|
return txt_xpos;
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user