mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +02:00
gui/widget/stringinput_ext.cpp: fix size with hints, fix screen position
Origin commit data
------------------
Commit: 96cb49b4fe
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-07-16 (Mon, 16 Jul 2012)
This commit is contained in:
@@ -116,13 +116,21 @@ void CExtendedInput::calculateDialog()
|
|||||||
|
|
||||||
hintPosY = height -10;
|
hintPosY = height -10;
|
||||||
|
|
||||||
if (hint_1 != NONEXISTANT_LOCALE)
|
if (hint_1 != NONEXISTANT_LOCALE) {
|
||||||
height += iheight;
|
height += iheight;
|
||||||
if (hint_2 != NONEXISTANT_LOCALE)
|
int hw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_1), true);
|
||||||
|
if(width < hw + 40)
|
||||||
|
width = hw + 40;
|
||||||
|
}
|
||||||
|
if (hint_2 != NONEXISTANT_LOCALE) {
|
||||||
height += iheight;
|
height += iheight;
|
||||||
|
int hw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getRenderWidth(g_Locale->getText(hint_2), true);
|
||||||
|
if(width < hw)
|
||||||
|
width = hw;
|
||||||
|
}
|
||||||
|
|
||||||
x = ((frameBuffer->getScreenWidth() - width)>>1);
|
x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth() - width)>>1);
|
||||||
y = ((frameBuffer->getScreenHeight() - height)>>1);
|
y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - height)>>1);
|
||||||
|
|
||||||
hintPosY += y;
|
hintPosY += y;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user