From b3747cf823ddbe2dd72af3a63b671aee2140f387 Mon Sep 17 00:00:00 2001 From: satbaby Date: Thu, 12 May 2011 13:00:28 +0000 Subject: [PATCH] http://www.dbox2world.net/board293-coolstream-hd1/board314-coolstream-development/10586-kleiner-anzeigebug-in-der-nummernbox-der-infobar/ git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1460 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/infoviewer.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 80d8c436e..8b6551d4f 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -196,11 +196,11 @@ void CInfoViewer::start () { /* default mode, with signal bars etc. */ ChanWidth = 122; ChanHeight = 74; - int test = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth()*12; + int test = g_SignalFont->getWidth() * 14; if (test > ChanWidth) { ChanWidth = test; } - test = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight() * 9 / 8; + test = (g_SignalFont->getHeight() * 2) + 36; if (test > ChanHeight) { ChanHeight = test; } @@ -1295,7 +1295,12 @@ void CInfoViewer::showSNR () newfreq = false; CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo (); - snprintf (freq, sizeof(freq), "%d.%d MHz %c", si.tsfrequency / 1000, si.tsfrequency % 1000, si.polarisation ? 'V' : 'H'); + std::string polarisation; + if (g_info.delivery_system == DVB_S || (cs_get_revision() == 1)) + polarisation = (si.polarisation) ? "V" : "H"; + else + polarisation = ""; + snprintf (freq, sizeof(freq), "%d.%d MHz %s", si.tsfrequency / 1000, si.tsfrequency % 1000, polarisation.c_str()); #if 0 //FIXME this sets default params for scan menu sprintf (get_set.TP_freq, "%d", si.tsfrequency); @@ -1320,10 +1325,9 @@ void CInfoViewer::showSNR () if (lastsig != sig) { lastsig = sig; - posx = BoxStartX + 4; + posx = BoxStartX + (ChanWidth - (bar_width + 2 + (g_SignalFont->getWidth() * 4))) / 2; posy = ChanNumYPos + 3; sigscale->paintProgressBar(posx, posy+4, bar_width, 10, sig, 100); - snprintf (percent, sizeof(percent), "%d%%S", sig); posx = posx + bar_width + 2; sw = BoxStartX + ChanWidth - posx; @@ -1332,11 +1336,9 @@ void CInfoViewer::showSNR () } if (lastsnr != snr) { lastsnr = snr; - posx = BoxStartX + 4; + posx = BoxStartX + (ChanWidth - (bar_width + 2 + (g_SignalFont->getWidth() * 4))) / 2; posy = ChanNumYPos + 3 + height - 2; - snrscale->paintProgressBar(posx, posy+4, bar_width, 10, snr, 100); - snprintf (percent, sizeof(percent), "%d%%Q", snr); posx = posx + bar_width + 2; sw = BoxStartX + ChanWidth - posx -4;