mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
neutrino: resize keychooser window with font size
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@307 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -153,7 +153,16 @@ void CKeyChooserItem::paint()
|
|||||||
|
|
||||||
CFrameBuffer * frameBuffer = CFrameBuffer::getInstance();
|
CFrameBuffer * frameBuffer = CFrameBuffer::getInstance();
|
||||||
|
|
||||||
width = w_max(350, 0);
|
int tmp;
|
||||||
|
width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(name), true);
|
||||||
|
tmp = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_KEYCHOOSER_TEXT1), true);
|
||||||
|
if (tmp > width)
|
||||||
|
width = tmp;
|
||||||
|
tmp = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(LOCALE_KEYCHOOSER_TEXT2), true);
|
||||||
|
if (tmp > width)
|
||||||
|
width = tmp;
|
||||||
|
width += 20;
|
||||||
|
width = w_max(width, 0);
|
||||||
height = h_max(hheight + 2 * mheight, 0);
|
height = h_max(hheight + 2 * mheight, 0);
|
||||||
x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1);
|
x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1);
|
||||||
y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height) >> 1);
|
y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height) >> 1);
|
||||||
|
Reference in New Issue
Block a user