mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
Fixes for non-standart icon sizes. Not complete yet, work in progress. Probably will broke commit #568
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@569 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 56674d5561
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-05-06 (Thu, 06 May 2010)
This commit is contained in:
@@ -26,22 +26,24 @@
|
||||
#include <gui/widget/buttons.h>
|
||||
|
||||
#include <gui/color.h>
|
||||
|
||||
#if 1
|
||||
void paintButtons(CFrameBuffer * const frameBuffer, Font * const font, const CLocaleManager * const localemanager, const int x, const int y, const unsigned int buttonwidth, const unsigned int count, const struct button_label * const content)
|
||||
{
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
#if 0
|
||||
int iw, ih, yy;
|
||||
int fh = font->getHeight();
|
||||
frameBuffer->getIconSize(content[i].button, &iw, &ih);
|
||||
yy = y + (fh - ih)/2;
|
||||
frameBuffer->paintIcon(content[i].button, x + i * buttonwidth, yy);
|
||||
font->RenderString(x + i * buttonwidth + iw + 5, y + 19, buttonwidth - iw - 5, localemanager->getText(content[i].locale), COL_INFOBAR, 0, true); // UTF-8
|
||||
#else
|
||||
frameBuffer->paintIcon(content[i].button, x + i * buttonwidth, y);
|
||||
//FIXME why y+19 ??
|
||||
font->RenderString(x + i * buttonwidth + 20, y + 19, buttonwidth - 20, localemanager->getText(content[i].locale), COL_INFOBAR, 0, true); // UTF-8
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
void paintButtons(CFrameBuffer * const frameBuffer, Font * const font, const CLocaleManager * const localemanager, const int x, const int y, const unsigned int buttonwidth, const unsigned int height, const unsigned int count, const struct button_label * const content)
|
||||
{
|
||||
int iw, ih;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
int fh = font->getHeight();
|
||||
frameBuffer->getIconSize(content[i].button, &iw, &ih);
|
||||
frameBuffer->paintIcon(content[i].button, x + i * buttonwidth, y, height);
|
||||
font->RenderString(x + i * buttonwidth + iw + 5, y + (height-fh)/2 + fh, buttonwidth - iw - 5, localemanager->getText(content[i].locale), COL_INFOBAR, 0, true); // UTF-8
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user