Calc %% from full screen width

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@402 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2010-02-23 10:40:40 +00:00
parent 9a56e4cb03
commit da9704d766

View File

@@ -108,8 +108,11 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const int /*m
if (mwidth > 100) /* warn about abuse until we found all offenders... */
fprintf(stderr, "CMenuWidget::Init (%s) (%s) mwidth over 100%%: %d\n", nameString.c_str(), Icon.c_str(), mwidth);
else
min_width = frameBuffer->getScreenWidth() * mwidth / 100;
else {
min_width = frameBuffer->getScreenWidth(true) * mwidth / 100;
if(min_width > (int) frameBuffer->getScreenWidth())
min_width = frameBuffer->getScreenWidth();
}
/* set the max height to 9/10 of usable screen height
debatable, if the callers need a possibility to set this */