mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
rename SHADOW_OFFSET -> OFFSET_SHADOW
Origin commit data
------------------
Commit: 5d450c60d3
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-10 (Mon, 10 Oct 2016)
Origin message was:
------------------
- rename SHADOW_OFFSET -> OFFSET_SHADOW
This commit is contained in:
@@ -199,7 +199,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const std::string &Capti
|
||||
// printf("pages: %d, startEntryVec: %d\n",page+1,m_startEntryOfPage.size()-1);
|
||||
// printf("maxEntries: %d\n", m_maxEntriesPerPage);
|
||||
|
||||
m_width = w_max(maxWidth,SHADOW_OFFSET);
|
||||
m_width = w_max(maxWidth,OFFSET_SHADOW);
|
||||
m_currentPage = 0;
|
||||
m_pages = page + 1;
|
||||
unsigned int additional_width;
|
||||
@@ -227,7 +227,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const std::string &Capti
|
||||
|
||||
/* if the output does not fit, make sure we at least
|
||||
* stay inside the screen... */
|
||||
m_width = w_max(m_width ,SHADOW_OFFSET);
|
||||
m_width = w_max(m_width ,OFFSET_SHADOW);
|
||||
if (maxLineWidth + scrollWidth > m_width)
|
||||
maxLineWidth = m_width - scrollWidth;
|
||||
|
||||
@@ -250,10 +250,10 @@ void CHintBoxExt::paint(bool toround)
|
||||
}
|
||||
|
||||
bgPainted = false;
|
||||
m_window = new CFBWindow(getScreenStartX(m_width + SHADOW_OFFSET),
|
||||
getScreenStartY(m_height + SHADOW_OFFSET),
|
||||
m_width + SHADOW_OFFSET,
|
||||
m_height + SHADOW_OFFSET);
|
||||
m_window = new CFBWindow(getScreenStartX(m_width + OFFSET_SHADOW),
|
||||
getScreenStartY(m_height + OFFSET_SHADOW),
|
||||
m_width + OFFSET_SHADOW,
|
||||
m_height + OFFSET_SHADOW);
|
||||
|
||||
refresh(toround);
|
||||
}
|
||||
@@ -267,7 +267,7 @@ void CHintBoxExt::refresh(bool toround)
|
||||
|
||||
if (!bgPainted) {
|
||||
// bottom, right shadow
|
||||
m_window->paintBoxRel(SHADOW_OFFSET, SHADOW_OFFSET, m_width, m_height, COL_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT);
|
||||
m_window->paintBoxRel(OFFSET_SHADOW, OFFSET_SHADOW, m_width, m_height, COL_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT);
|
||||
bgPainted = true;
|
||||
}
|
||||
|
||||
|
@@ -530,9 +530,9 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
|
||||
|
||||
fb_pixel_t * pixbuf = NULL;
|
||||
if (!parent) {
|
||||
pixbuf = new fb_pixel_t[(width + SHADOW_OFFSET) * (height + SHADOW_OFFSET)];
|
||||
pixbuf = new fb_pixel_t[(width + OFFSET_SHADOW) * (height + OFFSET_SHADOW)];
|
||||
if (pixbuf)
|
||||
frameBuffer->SaveScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf);
|
||||
frameBuffer->SaveScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf);
|
||||
}
|
||||
|
||||
paint();
|
||||
@@ -626,7 +626,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
|
||||
|
||||
if (pixbuf)
|
||||
{
|
||||
frameBuffer->RestoreScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf);
|
||||
frameBuffer->RestoreScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf);
|
||||
delete[] pixbuf;
|
||||
} else
|
||||
hide();
|
||||
@@ -644,7 +644,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
|
||||
|
||||
void CKeyboardInput::hide()
|
||||
{
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET);
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
|
||||
}
|
||||
|
||||
int CKeyboardInput::paintFooter(bool show)
|
||||
@@ -668,7 +668,7 @@ int CKeyboardInput::paintFooter(bool show)
|
||||
|
||||
void CKeyboardInput::paint()
|
||||
{
|
||||
frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
||||
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
||||
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0);
|
||||
|
||||
CComponentsHeader header(x, y, width, hheight, head, iconfile);
|
||||
|
@@ -1190,8 +1190,8 @@ void CMenuWidget::calcSize()
|
||||
if(total_pages > 1)
|
||||
sb_width=15;
|
||||
|
||||
full_width = /*ConnectLineBox_Width+*/width+sb_width+SHADOW_OFFSET;
|
||||
full_height = height+RADIUS_LARGE+SHADOW_OFFSET*2 /*+hint_height+INFO_BOX_Y_OFFSET*/;
|
||||
full_width = /*ConnectLineBox_Width+*/width+sb_width+OFFSET_SHADOW;
|
||||
full_height = height+RADIUS_LARGE+OFFSET_SHADOW*2 /*+hint_height+INFO_BOX_Y_OFFSET*/;
|
||||
/* + ConnectLineBox_Width for the hintbox connection line
|
||||
* + center_offset for symmetry
|
||||
* + 20 for setMenuPos calculates 10 pixels border left and right */
|
||||
@@ -1199,7 +1199,7 @@ void CMenuWidget::calcSize()
|
||||
int max_possible = (int)frameBuffer->getScreenWidth() - ConnectLineBox_Width - center_offset - 20;
|
||||
if (full_width > max_possible)
|
||||
{
|
||||
width = max_possible - sb_width - SHADOW_OFFSET;
|
||||
width = max_possible - sb_width - OFFSET_SHADOW;
|
||||
full_width = max_possible + center_offset; /* symmetry in MENU_POS_CENTER case */
|
||||
}
|
||||
|
||||
@@ -1248,7 +1248,7 @@ void CMenuWidget::paint()
|
||||
header->paint(CC_SAVE_SCREEN_NO);
|
||||
|
||||
// paint body shadow
|
||||
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, y + hheight + SHADOW_OFFSET, width + sb_width, height - hheight + RADIUS_LARGE + (fbutton_count ? fbutton_height : 0), COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
frameBuffer->paintBoxRel(x+OFFSET_SHADOW, y + hheight + OFFSET_SHADOW, width + sb_width, height - hheight + RADIUS_LARGE + (fbutton_count ? fbutton_height : 0), COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
// paint body background
|
||||
frameBuffer->paintBoxRel(x, y+hheight, width + sb_width, height-hheight + RADIUS_LARGE, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, (fbutton_count ? CORNER_NONE : CORNER_BOTTOM));
|
||||
|
||||
@@ -1448,7 +1448,7 @@ void CMenuWidget::paintHint(int pos)
|
||||
int iheight = item->getHeight();
|
||||
int rad = RADIUS_LARGE;
|
||||
int xpos = x - ConnectLineBox_Width;
|
||||
int ypos2 = y + height + fbutton_height + rad + SHADOW_OFFSET + INFO_BOX_Y_OFFSET;
|
||||
int ypos2 = y + height + fbutton_height + rad + OFFSET_SHADOW + INFO_BOX_Y_OFFSET;
|
||||
int iwidth = width+sb_width;
|
||||
|
||||
//init details line and infobox dimensions
|
||||
|
@@ -75,7 +75,7 @@ void CMessageBox::Init(const CMessageBox::result_ &Default, const uint32_t ShowB
|
||||
}
|
||||
fh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight();
|
||||
b_height = std::max(fh, ih) + 8 + (RADIUS_MID / 2);
|
||||
m_bbheight = b_height + fh/2 + ButtonSpacing + SHADOW_OFFSET;
|
||||
m_bbheight = b_height + fh/2 + ButtonSpacing + OFFSET_SHADOW;
|
||||
result = Default;
|
||||
b_width = getButtonWidth();
|
||||
if (ShowButtons & CMessageBox::mbBtnAlignCenter1)
|
||||
@@ -176,7 +176,7 @@ void CMessageBox::paintButtons()
|
||||
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
|
||||
}
|
||||
CFrameBuffer::getInstance()->getIconSize(Buttons[i].icon, &iw, &ih);
|
||||
m_window->paintBoxRel(xpos + SHADOW_OFFSET, ypos + SHADOW_OFFSET, b_width, b_height, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_window->paintBoxRel(xpos + OFFSET_SHADOW, ypos + OFFSET_SHADOW, b_width, b_height, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_window->paintBoxRel(xpos, ypos, b_width, b_height, (CFBWindow::color_t)bgcolor, RADIUS_MID);
|
||||
m_window->paintBoxFrame(xpos, ypos, b_width, b_height, 1, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_window->paintIcon(Buttons[i].icon, xpos + ((b_height - ih) / 2), ypos + ((b_height - ih) / 2), ih);
|
||||
|
@@ -359,7 +359,7 @@ void CMsgBox::refreshFoot(void)
|
||||
color = COL_MENUCONTENTINACTIVE_TEXT;
|
||||
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
|
||||
}
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + SHADOW_OFFSET, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + SHADOW_OFFSET, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + OFFSET_SHADOW, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + OFFSET_SHADOW, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, (CFBWindow::color_t)bgcolor, RADIUS_MID);
|
||||
m_pcWindow->paintBoxFrame(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, 1, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_RED, xpos + 14+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY);
|
||||
@@ -382,7 +382,7 @@ void CMsgBox::refreshFoot(void)
|
||||
color = COL_MENUCONTENTINACTIVE_TEXT;
|
||||
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
|
||||
}
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + SHADOW_OFFSET, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + SHADOW_OFFSET, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + OFFSET_SHADOW, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + OFFSET_SHADOW, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, (CFBWindow::color_t)bgcolor, RADIUS_MID);
|
||||
m_pcWindow->paintBoxFrame(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, 1, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, xpos + 14+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY);
|
||||
@@ -405,7 +405,7 @@ void CMsgBox::refreshFoot(void)
|
||||
color = COL_MENUCONTENTINACTIVE_TEXT;
|
||||
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
|
||||
}
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + SHADOW_OFFSET, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + SHADOW_OFFSET, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX + OFFSET_SHADOW, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY + OFFSET_SHADOW, ButtonWidth, m_nFontFootHeight + 4, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintBoxRel(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, (CFBWindow::color_t)bgcolor, RADIUS_MID);
|
||||
m_pcWindow->paintBoxFrame(xpos+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth, m_nFontFootHeight + 4, 1, COL_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_pcWindow->paintIcon(NEUTRINO_ICON_BUTTON_HOME, xpos+10+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY);
|
||||
|
@@ -394,9 +394,9 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
|
||||
|
||||
fb_pixel_t * pixbuf = NULL;
|
||||
if (!parent) {
|
||||
pixbuf = new fb_pixel_t[(width + SHADOW_OFFSET) * (height + SHADOW_OFFSET)];
|
||||
pixbuf = new fb_pixel_t[(width + OFFSET_SHADOW) * (height + OFFSET_SHADOW)];
|
||||
if (pixbuf)
|
||||
frameBuffer->SaveScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf);
|
||||
frameBuffer->SaveScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf);
|
||||
}
|
||||
|
||||
paint();
|
||||
@@ -519,7 +519,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
|
||||
|
||||
if (pixbuf)
|
||||
{
|
||||
frameBuffer->RestoreScreen(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET, pixbuf);
|
||||
frameBuffer->RestoreScreen(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW, pixbuf);
|
||||
delete[] pixbuf;//Mismatching allocation and deallocation: pixbuf
|
||||
frameBuffer->blit();
|
||||
} else
|
||||
@@ -541,13 +541,13 @@ int CStringInput::handleOthers(const neutrino_msg_t /*msg*/, const neutrino_msg_
|
||||
|
||||
void CStringInput::hide()
|
||||
{
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET);
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
|
||||
frameBuffer->blit();
|
||||
}
|
||||
|
||||
void CStringInput::paint(bool sms)
|
||||
{
|
||||
frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
||||
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
||||
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM);
|
||||
|
||||
CComponentsHeader header(x, y, width, hheight, head, iconfile);
|
||||
@@ -901,7 +901,7 @@ const char * CPLPINInput::getHint1(void)
|
||||
}
|
||||
}
|
||||
|
||||
#define borderwidth SHADOW_OFFSET // FIXME: do we need border around ??
|
||||
#define borderwidth OFFSET_SHADOW // FIXME: do we need border around ??
|
||||
|
||||
int CPLPINInput::exec( CMenuTarget* parent, const std::string & )
|
||||
{
|
||||
|
Reference in New Issue
Block a user