mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +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
------------------
Branch: ni/coolstream
Commit: 56674d5561
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-05-06 (Thu, 06 May 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -97,7 +97,6 @@ void CMessageBox::paintButtons()
|
||||
uint8_t color;
|
||||
fb_pixel_t bgcolor;
|
||||
|
||||
//m_window->paintBoxRel(0, m_height - (m_fheight << 1), m_width, (m_fheight << 1), (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0);
|
||||
m_window->paintBoxRel(0, m_height - (m_fheight << 1), m_width, (m_fheight << 1), (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
|
||||
//irgendwann alle vergleichen - aber cancel ist sicher der l<>ngste
|
||||
@@ -105,13 +104,11 @@ void CMessageBox::paintButtons()
|
||||
|
||||
int ButtonWidth = 20 + 33 + MaxButtonTextWidth;
|
||||
|
||||
// int ButtonSpacing = 40;
|
||||
// int startpos = (m_width - ((ButtonWidth*3)+(ButtonSpacing*2))) / 2;
|
||||
|
||||
int ButtonSpacing = (m_width - 20 - (ButtonWidth * 3)) / 2;
|
||||
if(ButtonSpacing <= 5) ButtonSpacing = 5;
|
||||
|
||||
int xpos = 10;
|
||||
int iw, ih;
|
||||
|
||||
if (showbuttons & mbYes)
|
||||
{
|
||||
@@ -125,14 +122,15 @@ void CMessageBox::paintButtons()
|
||||
color = COL_INFOBAR_SHADOW;
|
||||
bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
|
||||
}
|
||||
//m_window->paintBoxRel(xpos, m_height - m_fheight - 20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor);
|
||||
CFrameBuffer::getInstance()->getIconSize(NEUTRINO_ICON_BUTTON_RED, &iw, &ih);
|
||||
m_window->paintBoxRel(xpos, m_height - m_fheight - 20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, RADIUS_LARGE);//round
|
||||
m_window->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14, m_height - m_fheight - 15);
|
||||
//m_window->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14, m_height - m_fheight - 15);
|
||||
//m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_YES), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||
m_window->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14, m_height - m_fheight - 20, m_fheight);
|
||||
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_YES), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||
xpos += ButtonWidth + ButtonSpacing;
|
||||
}
|
||||
|
||||
|
||||
if (showbuttons & mbNo)
|
||||
{
|
||||
if (result == mbrNo)
|
||||
@@ -146,9 +144,9 @@ void CMessageBox::paintButtons()
|
||||
bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
|
||||
}
|
||||
|
||||
//m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor);
|
||||
m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, RADIUS_LARGE);//round
|
||||
m_window->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos+14, m_height-m_fheight-15);
|
||||
//m_window->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos+14, m_height-m_fheight-15);
|
||||
m_window->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos+14, m_height-m_fheight - 20, m_fheight);
|
||||
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_NO), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||
xpos += ButtonWidth + ButtonSpacing;
|
||||
}
|
||||
@@ -167,9 +165,9 @@ void CMessageBox::paintButtons()
|
||||
bgcolor = COL_INFOBAR_SHADOW_PLUS_0;
|
||||
}
|
||||
|
||||
//m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor);
|
||||
m_window->paintBoxRel(xpos, m_height-m_fheight-20, ButtonWidth, m_fheight, (CFBWindow::color_t)bgcolor, RADIUS_LARGE);//round
|
||||
m_window->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+10, m_height-m_fheight-19);
|
||||
//m_window->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+10, m_height-m_fheight-19);
|
||||
m_window->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+14, m_height-m_fheight - 20, m_fheight);
|
||||
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + 43, m_height-m_fheight+4, ButtonWidth- 53, g_Locale->getText((showbuttons & mbCancel) ? LOCALE_MESSAGEBOX_CANCEL : LOCALE_MESSAGEBOX_BACK), (CFBWindow::color_t)color, 0, true); // UTF-8
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user