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:
vanhofen
2016-10-10 14:19:55 +02:00
parent 8419c90eb4
commit f21851aec0
19 changed files with 78 additions and 78 deletions

View File

@@ -49,7 +49,7 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha)
corner_rad = corner_rad_old = 0;
shadow = CC_SHADOW_OFF;
shadow_w = shadow_w_old = SHADOW_OFFSET;
shadow_w = shadow_w_old = OFFSET_SHADOW;
shadow_force = false;
cc_paint_cache = false;

View File

@@ -52,7 +52,7 @@ CComponentsForm::CComponentsForm( const int x_pos, const int y_pos, const int w,
cc_yr = y;
shadow = shadow_mode;
shadow_w = SHADOW_OFFSET;
shadow_w = OFFSET_SHADOW;
corner_rad = RADIUS_LARGE;
corner_type = CORNER_ALL;
cc_item_index = 0;

View File

@@ -100,7 +100,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const
width = w;
height = h;
shadow = shadow_mode;
shadow_w = shadow ? SHADOW_OFFSET/2 : 0; //buttons are mostly small elements, so these elements should have a reasonable shadow width
shadow_w = shadow ? OFFSET_SHADOW/2 : 0; //buttons are mostly small elements, so these elements should have a reasonable shadow width
cc_body_gradient_enable = CC_COLGRAD_OFF/*g_settings.gradiant*/; //TODO: gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient
setColBodyGradient(cc_body_gradient_enable/*CColorGradient::gradientLight2Dark*/, CFrameBuffer::gradientVertical, CColorGradient::light);

View File

@@ -61,7 +61,7 @@ CComponentsFrmClock::CComponentsFrmClock( const int& x_pos,
y = y_pos;
shadow = shadow_mode;
shadow_w = SHADOW_OFFSET;
shadow_w = OFFSET_SHADOW;
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;

View File

@@ -78,7 +78,7 @@ void CComponentsPicture::init( const int &x_pos, const int &y_pos, const int &w,
height = dy = dyc = h;
pic_name = pic_name_old = image_name;
shadow = shadow_mode;
shadow_w = SHADOW_OFFSET;
shadow_w = OFFSET_SHADOW;
col_frame = color_frame;
col_body = color_background;
col_shadow = color_shadow;

View File

@@ -48,7 +48,7 @@ CComponentsShapeSquare::CComponentsShapeSquare( const int x_pos, const int y_pos
width = width_old = w;
height = height_old = h;
shadow = shadow_mode;
shadow_w = SHADOW_OFFSET;
shadow_w = OFFSET_SHADOW;
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;
@@ -76,7 +76,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
y = y_pos;
//width = height = d = diam;
shadow = shadow_mode;
shadow_w = SHADOW_OFFSET;
shadow_w = OFFSET_SHADOW;
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;

View File

@@ -60,7 +60,7 @@ CComponentsPIP::CComponentsPIP( const int x_pos, const int y_pos, const int perc
width = percent*screen_w/100;
height = percent*screen_h/100;
shadow = shadow_mode;
shadow_w = SHADOW_OFFSET;
shadow_w = OFFSET_SHADOW;
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;

View File

@@ -60,7 +60,7 @@ void CInfoClock::initCCLockItems()
if (paint_bg){
cl_col_text = COL_MENUCONTENT_TEXT;
setColorBody(COL_MENUCONTENT_PLUS_0);
enableShadow(CC_SHADOW_ON, SHADOW_OFFSET/2);
enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2);
}else{
cl_col_text = COL_INFOCLOCK_TEXT;
setColorBody(COL_BACKGROUND_PLUS_0);

View File

@@ -211,7 +211,7 @@ void CInfoViewer::start ()
BoxEndY = g_settings.screen_EndY - 10 - infoViewerBB->InfoHeightY_Info - infoViewerBB->bottom_bar_offset;
BoxStartY = BoxEndY - InfoHeightY - ChanHeight / 2;
ChanNameY = BoxStartY + (ChanHeight / 2) + SHADOW_OFFSET;
ChanNameY = BoxStartY + (ChanHeight / 2) + OFFSET_SHADOW;
ChanInfoX = BoxStartX + (ChanWidth / 3);
initClock();
@@ -292,12 +292,12 @@ void CInfoViewer::showRecordIcon (const bool show)
int txt_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
int txt_w = 0;
int box_x = BoxStartX + ChanWidth + 2*SHADOW_OFFSET;
int box_y = BoxStartY + SHADOW_OFFSET;
int box_x = BoxStartX + ChanWidth + 2*OFFSET_SHADOW;
int box_y = BoxStartY + OFFSET_SHADOW;
int box_w = 0;
int box_h = txt_h;
int icon_space = SHADOW_OFFSET/2;
int icon_space = OFFSET_SHADOW/2;
int rec_icon_x = 0, rec_icon_w = 0, rec_icon_h = 0;
int ts_icon_x = 0, ts_icon_w = 0, ts_icon_h = 0;
@@ -343,7 +343,7 @@ void CInfoViewer::showRecordIcon (const bool show)
if (rec == NULL){ //TODO: full refactoring of this icon handler
rec = new CComponentsShapeSquare(box_x, box_y , box_w, box_h, NULL, CC_SHADOW_ON, COL_RED, COL_INFOBAR_PLUS_0);
rec->setFrameThickness(2);
rec->setShadowWidth(SHADOW_OFFSET/2);
rec->setShadowWidth(OFFSET_SHADOW/2);
rec->setCorner(RADIUS_MIN, CORNER_ALL);
}
if (rec->getWidth() != box_w)
@@ -392,17 +392,17 @@ void CInfoViewer::paintBackground(int col_NumBox)
frameBuffer->paintBackgroundBox(BoxStartX,
BoxStartY + ChanHeight - 6,
BoxStartX + ChanWidth / 3,
BoxEndInfoY + SHADOW_OFFSET);
BoxEndInfoY + OFFSET_SHADOW);
// kill progressbar + info-line
frameBuffer->paintBackgroundBox(BoxStartX + ChanWidth + 40, // 40 for the recording icon!
BoxStartY, BoxEndX, BoxStartY + ChanHeight);
// shadow for channel name, epg data...
frameBuffer->paintBox(BoxEndX - c_shadow_width, ChanNameY + SHADOW_OFFSET,
BoxEndX + SHADOW_OFFSET, BoxEndInfoY + SHADOW_OFFSET,
frameBuffer->paintBox(BoxEndX - c_shadow_width, ChanNameY + OFFSET_SHADOW,
BoxEndX + OFFSET_SHADOW, BoxEndInfoY + OFFSET_SHADOW,
COL_SHADOW_PLUS_0, c_rad_large, CORNER_RIGHT);
frameBuffer->paintBox(ChanInfoX + SHADOW_OFFSET, BoxEndInfoY - c_shadow_width,
BoxEndX - c_shadow_width, BoxEndInfoY + SHADOW_OFFSET,
frameBuffer->paintBox(ChanInfoX + OFFSET_SHADOW, BoxEndInfoY - c_shadow_width,
BoxEndX - c_shadow_width, BoxEndInfoY + OFFSET_SHADOW,
COL_SHADOW_PLUS_0, c_rad_large, CORNER_BOTTOM_LEFT);
#endif
// background for channel name/logo and clock
@@ -412,10 +412,10 @@ void CInfoViewer::paintBackground(int col_NumBox)
paintBody();
// number box
int y_numbox = body->getYPos()-ChanHeight-SHADOW_OFFSET;
int y_numbox = body->getYPos()-ChanHeight-OFFSET_SHADOW;
if (numbox == NULL){ //TODO: move into an own member, paintNumBox() or so...
numbox = new CComponentsShapeSquare(BoxStartX, y_numbox, ChanWidth, ChanHeight);
numbox->enableShadow(CC_SHADOW_ON, SHADOW_OFFSET, true);
numbox->enableShadow(CC_SHADOW_ON, OFFSET_SHADOW, true);
}else
numbox->setDimensionsAll(BoxStartX, y_numbox, ChanWidth, ChanHeight);
numbox->setColorBody(g_settings.theme.infobar_gradient_top ? COL_MENUHEAD_PLUS_0 : col_NumBox);
@@ -444,7 +444,7 @@ void CInfoViewer::paintHead()
void CInfoViewer::paintBody()
{
int h_body = InfoHeightY - header_height - SHADOW_OFFSET;
int h_body = InfoHeightY - header_height - OFFSET_SHADOW;
infoViewerBB->initBBOffset();
if (!zap_mode)
h_body += infoViewerBB->bottom_bar_offset;
@@ -584,7 +584,7 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe
current_channel_id = Channel_Id;
/* showChannelLogo() changes this, so better reset it every time... */
ChanNameX = BoxStartX + ChanWidth + SHADOW_OFFSET;
ChanNameX = BoxStartX + ChanWidth + OFFSET_SHADOW;
paintBackground(COL_INFOBAR_PLUS_0);
@@ -761,7 +761,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
}
/* showChannelLogo() changes this, so better reset it every time... */
ChanNameX = BoxStartX + ChanWidth + SHADOW_OFFSET;
ChanNameX = BoxStartX + ChanWidth + OFFSET_SHADOW;
paintBackground(col_NumBox);
@@ -1318,8 +1318,8 @@ void CInfoViewer::showRadiotext()
rt_dy = 25;
rt_x = BoxStartX;
rt_y = g_settings.screen_StartY + 10;
rt_h = rt_y + 7 + rt_dy*(g_Radiotext->S_RtOsdRows+1)+SHADOW_OFFSET;
rt_w = rt_x+rt_dx+SHADOW_OFFSET;
rt_h = rt_y + 7 + rt_dy*(g_Radiotext->S_RtOsdRows+1)+OFFSET_SHADOW;
rt_w = rt_x+rt_dx+OFFSET_SHADOW;
int lines = 0;
for (int i = 0; i < g_Radiotext->S_RtOsdRows; i++) {
@@ -1339,7 +1339,7 @@ void CInfoViewer::showRadiotext()
sprintf(stext[0], g_Radiotext->RT_PTY == 0 ? "%s %s%s" : "%s (%s)%s", tr("Radiotext"), g_Radiotext->RT_PTY == 0 ? g_Radiotext->RDS_PTYN : g_Radiotext->ptynr2string(g_Radiotext->RT_PTY), ":");
// shadow
frameBuffer->paintBoxRel(rt_x+SHADOW_OFFSET, rt_y+SHADOW_OFFSET, rt_dx, rt_dy, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP);
frameBuffer->paintBoxRel(rt_x+OFFSET_SHADOW, rt_y+OFFSET_SHADOW, rt_dx, rt_dy, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP);
frameBuffer->paintBoxRel(rt_x, rt_y, rt_dx, rt_dy, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_TOP);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rt_x+10, rt_y+ 30, rt_dx-20, stext[0], COL_INFOBAR_TEXT, 0, RTisIsUTF);
}
@@ -1368,7 +1368,7 @@ void CInfoViewer::showRadiotext()
}
// Body
if (lines) {
frameBuffer->paintBoxRel(rt_x+SHADOW_OFFSET, rt_y+rt_dy+SHADOW_OFFSET, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
frameBuffer->paintBoxRel(rt_x+OFFSET_SHADOW, rt_y+rt_dy+OFFSET_SHADOW, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
frameBuffer->paintBoxRel(rt_x, rt_y+rt_dy, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
// RT-Text roundloop
@@ -1719,7 +1719,7 @@ void CInfoViewer::display_Info(const char *current, const char *next,
if (pb_pos > -1)
{
int pb_w = 112;
int pb_startx = BoxEndX - pb_w - SHADOW_OFFSET;
int pb_startx = BoxEndX - pb_w - OFFSET_SHADOW;
int pb_starty = ChanNameY - (pb_h + 10);
if (g_settings.infobar_progressbar)
{
@@ -1727,7 +1727,7 @@ void CInfoViewer::display_Info(const char *current, const char *next,
pb_w = BoxEndX - 10 - xStart;
}
int tmpY = CurrInfoY - height - ChanNameY + header_height -
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset()/3+SHADOW_OFFSET;
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset()/3+OFFSET_SHADOW;
switch(g_settings.infobar_progressbar){ //set progressbar position
case SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_BELOW_CH_NAME:
pb_h = (pb_h/3);
@@ -1755,7 +1755,7 @@ void CInfoViewer::display_Info(const char *current, const char *next,
timescale->enableShadow(!g_settings.infobar_progressbar);
timescale->setValues(pb_p, pb_w);
//printf("paintProgressBar(%d, %d, %d, %d)\n", BoxEndX - pb_w - SHADOW_OFFSET, ChanNameY - (pb_h + 10) , pb_w, pb_h);
//printf("paintProgressBar(%d, %d, %d, %d)\n", BoxEndX - pb_w - OFFSET_SHADOW, ChanNameY - (pb_h + 10) , pb_w, pb_h);
}else{
if (g_settings.infobar_progressbar == SNeutrinoSettings::INFOBAR_PROGRESSBAR_ARRANGEMENT_DEFAULT)
timescale->kill();
@@ -2100,7 +2100,7 @@ void CInfoViewer::showInfoFile()
infobar_txt = new CComponentsInfoBox();
//set some properties for info object
infobar_txt->setCorner(RADIUS_SMALL);
infobar_txt->enableShadow(CC_SHADOW_ON, SHADOW_OFFSET/2);
infobar_txt->enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2);
infobar_txt->setTextColor(COL_INFOBAR_TEXT);
infobar_txt->setColorBody(COL_INFOBAR_PLUS_0);
infobar_txt->doPaintTextBoxBg(false);
@@ -2137,7 +2137,7 @@ void CInfoViewer::killTitle()
is_visible = false;
infoViewerBB->is_visible = false;
#if 0 //unused
int bottom = BoxEndY + SHADOW_OFFSET + infoViewerBB->bottom_bar_offset;
int bottom = BoxEndY + OFFSET_SHADOW + infoViewerBB->bottom_bar_offset;
if (showButtonBar)
bottom += infoViewerBB->InfoHeightY_Info;
#endif
@@ -2147,8 +2147,8 @@ void CInfoViewer::killTitle()
infoViewerBB->getCABar()->kill();
if (rec)
rec->kill();
//printf("killTitle(%d, %d, %d, %d)\n", BoxStartX, BoxStartY, BoxEndX+ SHADOW_OFFSET-BoxStartX, bottom-BoxStartY);
//frameBuffer->paintBackgroundBox(BoxStartX, BoxStartY, BoxEndX+ SHADOW_OFFSET, bottom);
//printf("killTitle(%d, %d, %d, %d)\n", BoxStartX, BoxStartY, BoxEndX+ OFFSET_SHADOW-BoxStartX, bottom-BoxStartY);
//frameBuffer->paintBackgroundBox(BoxStartX, BoxStartY, BoxEndX+ OFFSET_SHADOW, bottom);
if (!(zap_mode & IV_MODE_VIRTUAL_ZAP)){
if (infobar_txt)
infobar_txt->kill();

View File

@@ -650,7 +650,7 @@ void CTimerList::hide()
{
if (visible)
{
frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET);
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
visible = false;
}
}
@@ -674,7 +674,7 @@ void CTimerList::paintItem(int pos)
else
bgcolor = COL_MENUCONTENT_PLUS_0;
//shadow
frameBuffer->paintBoxRel(x + width, ypos, SHADOW_OFFSET, 2*fheight, COL_SHADOW_PLUS_0);
frameBuffer->paintBoxRel(x + width, ypos, OFFSET_SHADOW, 2*fheight, COL_SHADOW_PLUS_0);
//item
frameBuffer->paintBoxRel(x, ypos, real_width, 2*fheight, bgcolor);
@@ -855,7 +855,7 @@ void CTimerList::paintFoot()
}
//shadow
frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + height - footerHeight, width, footerHeight + SHADOW_OFFSET, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + height - footerHeight, width, footerHeight + OFFSET_SHADOW, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
if (timerlist.empty())
::paintButtons(x, y + height - footerHeight, width, 2, &(TimerListButtons[1]), width);

View File

@@ -81,7 +81,7 @@ CUpnpBrowserGui::CUpnpBrowserGui()
CFrameBuffer::getInstance()->OnAfterSetPallette.connect(reinit);
}
#define INNER_OFFSET SHADOW_OFFSET
#define INNER_OFFSET OFFSET_SHADOW
void CUpnpBrowserGui::Init()
{
@@ -134,10 +134,10 @@ void CUpnpBrowserGui::Init()
* infobox/timebox (with shadow)
*/
m_listmaxshow = (m_height - m_topbox_height - SHADOW_OFFSET - INNER_OFFSET - m_header_height - m_footer_height - SHADOW_OFFSET - INNER_OFFSET - m_infobox_height - SHADOW_OFFSET) / (m_item_height);
m_listmaxshow = (m_height - m_topbox_height - OFFSET_SHADOW - INNER_OFFSET - m_header_height - m_footer_height - OFFSET_SHADOW - INNER_OFFSET - m_infobox_height - OFFSET_SHADOW) / (m_item_height);
// recalc height
m_height = m_topbox_height + SHADOW_OFFSET + INNER_OFFSET + m_header_height + (m_listmaxshow * m_item_height) + m_footer_height + SHADOW_OFFSET + INNER_OFFSET + m_infobox_height + SHADOW_OFFSET;
m_height = m_topbox_height + OFFSET_SHADOW + INNER_OFFSET + m_header_height + (m_listmaxshow * m_item_height) + m_footer_height + OFFSET_SHADOW + INNER_OFFSET + m_infobox_height + OFFSET_SHADOW;
footer.setHeight(m_footer_height);
footer.enableShadow(CC_SHADOW_ON, -1, true);
@@ -148,10 +148,10 @@ void CUpnpBrowserGui::Init()
m_y=getScreenStartY(m_height);
// calc positions
m_header_y = m_y + m_topbox_height + SHADOW_OFFSET + INNER_OFFSET;
m_header_y = m_y + m_topbox_height + OFFSET_SHADOW + INNER_OFFSET;
m_item_y = m_header_y + m_header_height;
m_footer_y = m_item_y + (m_listmaxshow * m_item_height);
m_infobox_y = m_footer_y + m_footer_height + SHADOW_OFFSET + INNER_OFFSET;
m_infobox_y = m_footer_y + m_footer_height + OFFSET_SHADOW + INNER_OFFSET;
}
CUpnpBrowserGui::~CUpnpBrowserGui()
@@ -1004,7 +1004,7 @@ void CUpnpBrowserGui::paintDevices()
m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0);
//shadow
m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + SHADOW_OFFSET, SHADOW_OFFSET, sb, COL_SHADOW_PLUS_0);
m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + OFFSET_SHADOW, OFFSET_SHADOW, sb, COL_SHADOW_PLUS_0);
// Foot
footer.paintButtons(m_x, m_footer_y, m_width, m_footer_height, 1, &RescanButton, m_width/2);
@@ -1182,7 +1182,7 @@ void CUpnpBrowserGui::paintItems(std::vector<UPnPEntry> *entry, unsigned int sel
m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*((sb-4)/sbc+sbh), 11, (sb-4)/sbc + sbh, COL_SCROLLBAR_ACTIVE_PLUS_0);
//shadow
//m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + SHADOW_OFFSET, SHADOW_OFFSET, sb, COL_SHADOW_PLUS_0);
//m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + OFFSET_SHADOW, OFFSET_SHADOW, sb, COL_SHADOW_PLUS_0);
// Foot buttons
size_t numbuttons = sizeof(BrowseButtons)/sizeof(BrowseButtons[0]);
@@ -1194,7 +1194,7 @@ void CUpnpBrowserGui::paintDetails(UPnPEntry *entry, bool use_playing)
{
// Foot info
int timebox_width = m_infobox_height; // maybe not enough
infobox.setDimensionsAll(m_x, m_infobox_y, m_width - SHADOW_OFFSET - INNER_OFFSET - timebox_width, m_infobox_height);
infobox.setDimensionsAll(m_x, m_infobox_y, m_width - OFFSET_SHADOW - INNER_OFFSET - timebox_width, m_infobox_height);
timebox.setDimensionsAll(m_x + m_width - timebox_width, infobox.getYPos(), m_infobox_height, timebox_width);
printf("paintDetails: use_playing %d shown %d\n", use_playing, m_playing_entry_is_shown);

View File

@@ -127,14 +127,14 @@ void CVolumeBar::initVolumeBarPosition()
if (CNeutrinoApp::getInstance()->getChannellistIsVisible() == true)
y += std::max(39, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()) + v_spacer;
else if (g_settings.mode_clock)
y = clock_y + clock_height + v_spacer + SHADOW_OFFSET;
y = clock_y + clock_height + v_spacer + OFFSET_SHADOW;
}
x = sw - width - x_corr;
break;
}
case VOLUMEBAR_POS_TOP_LEFT:
if (CMoviePlayerGui::getInstance().osdTimeVisible())
y = clock_y + clock_height + v_spacer + SHADOW_OFFSET;
y = clock_y + clock_height + v_spacer + OFFSET_SHADOW;
break;
case VOLUMEBAR_POS_BOTTOM_LEFT:
y = (sh + frameBuffer->getScreenY()) - height - v_spacer;

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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 & )
{

View File

@@ -882,8 +882,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO
#define RADIUS_SMALL (g_settings.rounded_corners ? CORNER_RADIUS_SMALL : 0)
#define RADIUS_MIN (g_settings.rounded_corners ? CORNER_RADIUS_MIN : 0)
// shadow
#define SHADOW_OFFSET 6
// offsets
#define OFFSET_SHADOW 6
struct SglobalInfo
{