mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +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
Origin commit data
------------------
Commit: d6180e4ab2
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2010-02-08 (Mon, 08 Feb 2010)
This commit is contained in:
@@ -153,7 +153,16 @@ void CKeyChooserItem::paint()
|
||||
|
||||
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);
|
||||
x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1);
|
||||
y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height) >> 1);
|
||||
|
Reference in New Issue
Block a user