mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user