use: getWidth()

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@256 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: d974484c3e
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-02-04 (Thu, 04 Feb 2010)

Origin message was:
------------------
-use: getWidth()

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@256 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2010-02-04 12:13:19 +00:00
parent 4a5e45019e
commit 690df91520
2 changed files with 9 additions and 5 deletions

View File

@@ -93,9 +93,10 @@ void CDBoxInfoWidget::paint()
{
const int headSize = 5;
const char *head[headSize] = {"Filesystem", "Size", "Used", "Available", "Use%"};
int sizeOffset = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("9999.99M");
int percOffset = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("100%");
int nameOffset = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("WWWwwwwwww");
int fontWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth();
int sizeOffset = fontWidth * 7;//9999.99M
int percOffset = fontWidth * 3 ;//100%
int nameOffset = fontWidth * 9;//WWWwwwwwww
int offsetw = nameOffset+ (sizeOffset+10)*3 +10+percOffset+10;
offsetw += 20;
width = offsetw + 10 + 120;

View File

@@ -218,11 +218,14 @@ void CInfoViewer::start ()
{ /* default mode, with signal bars etc. */
ChanWidth = 122;
ChanHeight = 74;
int test = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth("12555.0 MHz H") + 10;
int test = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth()*12;
if(test > ChanWidth){
ChanWidth = test;
}
test = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight() * 9 / 8;
if(test > ChanHeight){
ChanHeight = test;
}
}
BoxStartX = g_settings.screen_StartX + 10;