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
This commit is contained in:
focus
2010-05-06 09:39:29 +00:00
parent 7373559b3d
commit 56674d5561
38 changed files with 678 additions and 354 deletions

View File

@@ -243,7 +243,15 @@ CTimerList::CTimerList()
liststart = 0;
Timer = new CTimerdClient();
skipEventID=0;
buttonHeight = 25;
/* assuming all color icons must have same size */
int icol_w, icol_h, ih2;
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h);
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_OKAY, &icol_w, &ih2);
icol_h = std::max(icol_h, ih2);
//buttonHeight = 7 + std::max(icol_h+2, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight());
buttonHeight = std::max(icol_h+4, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight());
}
CTimerList::~CTimerList()
@@ -398,6 +406,15 @@ void CTimerList::updateEvents(void)
width = w_max(720, 0);
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
int icol_w, icol_h;
frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &icol_w, &icol_h);
if(theight < icol_h)
theight = icol_h;
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &icol_h);
if(theight < icol_h)
theight = icol_h;
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
height = frameBuffer->getScreenHeight() - (info_height+50);
@@ -742,13 +759,17 @@ void CTimerList::paintItem(int pos)
void CTimerList::paintHead()
{
frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
frameBuffer->paintIcon(NEUTRINO_ICON_TIMER,x+5,y+4);
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+35,y+theight+0, width- 45, g_Locale->getText(LOCALE_TIMERLIST_NAME), COL_MENUHEAD, 0, true); // UTF-8
int icol_w, icol_h;
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x+ width- 30, y+ 5 );
/* if (bouquetList!=NULL)
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_DBOX, x+ width- 60, y+ 5 );*/
frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &icol_w, &icol_h);
frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
frameBuffer->paintIcon(NEUTRINO_ICON_TIMER, x+5, y, theight);
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+icol_w+15, y+theight+0, width - 45,
g_Locale->getText(LOCALE_TIMERLIST_NAME), COL_MENUHEAD, 0, true); // UTF-8
frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &icol_w, &icol_h);
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x + width - icol_w - 10, y, theight);
}
const struct button_label TimerListButtons[3] =
@@ -765,13 +786,17 @@ void CTimerList::paintFoot()
//frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0);
if (timerlist.empty())
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + ButtonWidth + 10, y + height + 4, ButtonWidth, 2, &(TimerListButtons[1]));
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
x + ButtonWidth + 10, y + height, ButtonWidth, buttonHeight, 2, &(TimerListButtons[1]));
else
{
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + height + 4, ButtonWidth, 3, TimerListButtons);
::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale,
x + 10, y + height, ButtonWidth, buttonHeight, 3, TimerListButtons);
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 1* ButtonWidth + 10, y+height);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width-1 * ButtonWidth + 38, y+height+24 - 2, ButtonWidth- 28, g_Locale->getText(LOCALE_TIMERLIST_MODIFY), COL_INFOBAR, 0, true); // UTF-8
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 1* ButtonWidth + 10, y+height, buttonHeight);
int fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width-1 * ButtonWidth + 38,
y + height + fh + (buttonHeight - fh)/2 , ButtonWidth- 28, g_Locale->getText(LOCALE_TIMERLIST_MODIFY), COL_INFOBAR, 0, true); // UTF-8
}
}