mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +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
Origin commit data
------------------
Branch: ni/coolstream
Commit: da9704d766
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-02-23 (Tue, 23 Feb 2010)
------------------
This commit was generated by Migit
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... */
|
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);
|
fprintf(stderr, "CMenuWidget::Init (%s) (%s) mwidth over 100%%: %d\n", nameString.c_str(), Icon.c_str(), mwidth);
|
||||||
else
|
else {
|
||||||
min_width = frameBuffer->getScreenWidth() * mwidth / 100;
|
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
|
/* set the max height to 9/10 of usable screen height
|
||||||
debatable, if the callers need a possibility to set this */
|
debatable, if the callers need a possibility to set this */
|
||||||
|
Reference in New Issue
Block a user