diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 94ca87cbb..f65db7a88 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -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; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index cfabae258..4b939757b 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -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;