mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
scale fixes
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@678 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6138bdb342
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-07-17 (Sat, 17 Jul 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -107,7 +107,6 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
|||||||
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
||||||
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||||
fw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth();
|
fw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth();
|
||||||
printf("####################################%i######%i######\n",mheight,fw);
|
|
||||||
width = w_max(fw * 42, 0);
|
width = w_max(fw * 42, 0);
|
||||||
height = h_max(hheight + (10 * mheight), 0); //9 lines
|
height = h_max(hheight + (10 * mheight), 0); //9 lines
|
||||||
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2;
|
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2;
|
||||||
@@ -495,26 +494,31 @@ void CScanTs::showSNR ()
|
|||||||
if (lastsig != sig) {
|
if (lastsig != sig) {
|
||||||
lastsig = sig;
|
lastsig = sig;
|
||||||
posx = x + 20;
|
posx = x + 20;
|
||||||
snprintf(percent,sizeof(percent), "%d%% SIG", sig);
|
sprintf(percent, "%d%%", sig);
|
||||||
sw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth ("100% SIG");
|
sw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth ("100%");
|
||||||
|
|
||||||
sigscale->paintProgressBar2(posx - 1, posy+2, sig);
|
sigscale->paintProgressBar2(posx - 1, posy+2, sig);
|
||||||
|
|
||||||
posx = posx + barwidth + 3;
|
posx = posx + barwidth + 3;
|
||||||
sw = x + 21 * fw - posx;
|
frameBuffer->paintBoxRel(posx, posy -1, sw, mheight-8, COL_MENUCONTENT_PLUS_0);
|
||||||
frameBuffer->paintBoxRel(posx, posy - 2, sw, mheight, COL_MENUCONTENT_PLUS_0);
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENTDARK);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENT);
|
|
||||||
|
frameBuffer->paintBoxRel(posx+(4*fw), posy - 2, 4*fw, mheight, COL_MENUCONTENT_PLUS_0);
|
||||||
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2+(4*fw), posy + mheight-(mheight-BAR_HEIGHT)/4, 4*fw, "SIG", COL_MENUCONTENT);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (lastsnr != snr) {
|
if (lastsnr != snr) {
|
||||||
lastsnr = snr;
|
lastsnr = snr;
|
||||||
posx = x + 20 + (20 * fw);
|
posx = x + 20 + (20 * fw);
|
||||||
snprintf(percent,sizeof(percent), "%d%% SNR", snr);
|
sprintf(percent, "%d%%", snr);
|
||||||
sw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth ("100% SNR");
|
sw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth ("100%");
|
||||||
snrscale->paintProgressBar2(posx - 1, posy+2, snr);
|
snrscale->paintProgressBar2(posx - 1, posy+2, snr);
|
||||||
|
|
||||||
posx = posx + barwidth + 3;
|
posx = posx + barwidth + 3;
|
||||||
sw = x + width - posx;
|
frameBuffer->paintBoxRel(posx, posy - 1, sw, mheight-8, COL_MENUCONTENT_PLUS_0, 0, true);
|
||||||
frameBuffer->paintBoxRel(posx, posy - 2, sw, mheight, COL_MENUCONTENT_PLUS_0);
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx + 2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENTDARK, 0, true);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENT);
|
|
||||||
|
frameBuffer->paintBoxRel(posx+(4*fw), posy - 2, 4*fw, mheight, COL_MENUCONTENT_PLUS_0);
|
||||||
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2+(4*fw), posy + mheight-(mheight-BAR_HEIGHT)/4, 4*fw, "SNR", COL_MENUCONTENT);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user