Bedit: adapt for infobox

The combination of infobox handling and screen size management doesn't
really fit together. Particular it  could be better implemented some
inheritance, because incorporated functions and variables are
redundant and so the classes can be better coordinated.
Moreover, it doesn't seem sensible to use only a part of the display.
The use of full screen instead of window could simplify a lot.
This commit is contained in:
2013-02-25 20:23:10 +01:00
parent 10f429ee0f
commit 152d40c6cd
3 changed files with 19 additions and 15 deletions

View File

@@ -164,10 +164,10 @@ int CBEChannelSelectWidget::exec(CMenuTarget* parent, const std::string & action
{
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth();
width = w_max ((frameBuffer->getScreenWidth() / 20 * (fw+6)), 100);
height = h_max ((frameBuffer->getScreenHeight() / 20 * 17), (frameBuffer->getScreenHeight() / 20 * 2));
height = h_max ((frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20 * 2));
listmaxshow = (height-theight-footerHeight-0)/iheight;
height = theight+footerHeight+listmaxshow*iheight; // recalc height
info_height = 2*iheight + 10;
info_height = 2*iheight + 4;
x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2;
y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - (height + info_height)) / 2;