dboxinfo: use more suitable column widths

Origin commit data
------------------
Commit: 81f71c2847
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-12-30 (Mon, 30 Dec 2013)
This commit is contained in:
Stefan Seyfried
2013-12-30 01:31:57 +01:00
parent 10a833f3e1
commit a25e481b13
2 changed files with 3 additions and 2 deletions

View File

@@ -90,6 +90,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
COSDFader fader(g_settings.menu_Content_alpha);
fader.StartFadeIn();
sizeWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("1023,99 MiB");
paint();
frameBuffer->blit();
@@ -208,9 +209,8 @@ void CDBoxInfoWidget::paint()
const int headSize = 5;
const char *head[headSize] = {"Filesystem", "Size", "Used", "Available", "Use"};
int fontWidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth();
int sizeWidth = fontWidth * 11;//9999.99 MiB
int percWidth = fontWidth * 4 ;//100%
int nameWidth = fontWidth * 17;//WWWwwwwwww
int nameWidth = fontWidth * 10;//WWWwwwwwww mountpoint, will auto-extend
height = hheight;
height += mheight/2; // space
height += mheight; // time

View File

@@ -48,6 +48,7 @@ class CDBoxInfoWidget : public CMenuTarget
int height;
int hheight,mheight; // head/menu font height
unsigned long stat_total, stat_idle;
int sizeWidth; // width of mem / disk sizes
void paint();