mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
- colors: some internal renamings
* INFOBAR_SHADOW to SHADOW because it's not only used in infoviewer * INFOBAR_SHADOW_TEXT to MENUFOOT_TEXT because it's the proper name This is in preparation to make footer colors configurable
This commit is contained in:
@@ -195,7 +195,7 @@ int paintButtons( const button_label_ext * const content,
|
||||
|
||||
//paint footer
|
||||
if (w_footer > 0)
|
||||
frameBuffer->paintBoxRel(x_footer, y_footer, w_footer, h_footer, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
frameBuffer->paintBoxRel(x_footer, y_footer, w_footer, h_footer, COL_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
|
||||
|
||||
//baseline
|
||||
@@ -250,7 +250,7 @@ int paintButtons( const button_label_ext * const content,
|
||||
// paint icon and text
|
||||
frameBuffer->paintIcon(icon, x_button , y_base - iconh[j]/2);
|
||||
x_caption = x_button + iconw[j] + h_space;
|
||||
font->RenderString(x_caption, y_caption, fwidth[j], caption, COL_INFOBAR_SHADOW_TEXT);
|
||||
font->RenderString(x_caption, y_caption, fwidth[j], caption, COL_MENUFOOT_TEXT);
|
||||
|
||||
/* set next startposition x, if text is length=0 then offset is =renderwidth of icon,
|
||||
* for generating buttons without captions,
|
||||
@@ -284,7 +284,7 @@ int paintButtons( const button_label_ext * const content,
|
||||
|
||||
* stuff below here was obviously not tested recently
|
||||
* vertical_paint optional, default value is false (horizontal) sets direction of painted buttons
|
||||
* fcolor optional, default value is COL_INFOBAR_SHADOW_TEXT, use it to render font with other color
|
||||
* fcolor optional, default value is COL_MENUFOOT_TEXT, use it to render font with other color
|
||||
* alt_buttontext optional, default NULL, overwrites button caption at definied buttonlabel id (see parameter alt_buttontext_id) with this text
|
||||
* alt_buttontext_id optional, default 0, means id from buttonlable struct which text you will change
|
||||
* show optional, default value is true (show button), if false, then no show and return the height of the button.
|
||||
@@ -392,7 +392,7 @@ int paintButtons( const int &x,
|
||||
|
||||
//paint footer
|
||||
if (w_footer > 0)
|
||||
frameBuffer->paintBoxRel(x_footer, y_footer, w_footer, h_footer, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
frameBuffer->paintBoxRel(x_footer, y_footer, w_footer, h_footer, COL_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
|
||||
|
||||
//baseline
|
||||
|
@@ -83,7 +83,7 @@ int paintButtons( const int &x,
|
||||
const int &footerheight = 0,
|
||||
std::string tmp = "", /* just to make sure compilation breaks */
|
||||
bool vertical_paint = false,
|
||||
const uint32_t fcolor = COL_INFOBAR_SHADOW_TEXT,
|
||||
const uint32_t fcolor = COL_MENUFOOT_TEXT,
|
||||
const char * alt_buttontext = NULL,
|
||||
const uint &buttontext_id = 0,
|
||||
bool show = true,
|
||||
|
@@ -174,10 +174,10 @@ void CHintBox::refresh(void)
|
||||
return;
|
||||
}
|
||||
|
||||
//window->paintBoxRel(borderwidth, height, width, borderwidth, COL_INFOBAR_SHADOW_PLUS_0);
|
||||
//window->paintBoxRel(width, borderwidth, borderwidth, height - borderwidth, COL_INFOBAR_SHADOW_PLUS_0);
|
||||
window->paintBoxRel(width - 20, borderwidth, borderwidth + 20, height - borderwidth - 20, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP); // right
|
||||
window->paintBoxRel(borderwidth, height-20, width, borderwidth+20, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); // bottom
|
||||
//window->paintBoxRel(borderwidth, height, width, borderwidth, COL_SHADOW_PLUS_0);
|
||||
//window->paintBoxRel(width, borderwidth, borderwidth, height - borderwidth, COL_SHADOW_PLUS_0);
|
||||
window->paintBoxRel(width - 20, borderwidth, borderwidth + 20, height - borderwidth - 20, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP); // right
|
||||
window->paintBoxRel(borderwidth, height-20, width, borderwidth+20, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); // bottom
|
||||
|
||||
CComponentsHeader header(window->x, window->y, width, theight, caption, iconfile);
|
||||
header.paint(CC_SAVE_SCREEN_NO);
|
||||
|
@@ -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_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT);
|
||||
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);
|
||||
bgPainted = true;
|
||||
}
|
||||
|
||||
|
@@ -1484,7 +1484,7 @@ void CMenuWidget::paintHint(int pos)
|
||||
info_box->setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENTDARK_PLUS_0, COL_MENUCONTENTDARK_PLUS_0);
|
||||
info_box->enableShadow();
|
||||
info_box->setPicture(item->hintIcon ? item->hintIcon : "");
|
||||
info_box->enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_INFOBAR_SHADOW_PLUS_1, g_settings.theme.menu_Hint_gradient_direction);// COL_INFOBAR_SHADOW_PLUS_1 is default footer color
|
||||
info_box->enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_1, g_settings.theme.menu_Hint_gradient_direction);// COL_SHADOW_PLUS_1 is default footer color
|
||||
|
||||
//paint result
|
||||
if (details_line)
|
||||
|
@@ -176,9 +176,9 @@ 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_INFOBAR_SHADOW_PLUS_0, RADIUS_MID);
|
||||
m_window->paintBoxRel(xpos + SHADOW_OFFSET, ypos + SHADOW_OFFSET, 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_INFOBAR_SHADOW_PLUS_0, 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);
|
||||
m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + iw + 17, ypos + fh + ((b_height - fh) / 2),
|
||||
b_width - (iw + 21), Buttons[i].text, (CFBWindow::color_t)color);
|
||||
|
@@ -359,9 +359,9 @@ 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_INFOBAR_SHADOW_PLUS_0, RADIUS_MID);
|
||||
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, 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_INFOBAR_SHADOW_PLUS_0, 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);
|
||||
/*m_pcWindow->RenderString(*/
|
||||
m_pcFontFoot->RenderString(xpos + 43+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + m_nFontFootHeight + 4 + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth - 53, g_Locale->getText(LOCALE_MESSAGEBOX_YES), (CFBWindow::color_t)color);
|
||||
@@ -382,9 +382,9 @@ 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_INFOBAR_SHADOW_PLUS_0, RADIUS_MID);
|
||||
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, 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_INFOBAR_SHADOW_PLUS_0, 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);
|
||||
/*m_pcWindow->RenderString(*/
|
||||
m_pcFontFoot->RenderString(xpos + 43+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + m_nFontFootHeight + 4 + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth- 53, g_Locale->getText(LOCALE_MESSAGEBOX_NO), (CFBWindow::color_t)color);
|
||||
@@ -405,9 +405,9 @@ 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_INFOBAR_SHADOW_PLUS_0, RADIUS_MID);
|
||||
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, 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_INFOBAR_SHADOW_PLUS_0, 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);
|
||||
/*m_pcWindow->RenderString(*/
|
||||
m_pcFontFoot->RenderString(xpos + 43+m_cBoxFrame.iX, m_cBoxFrameFootRel.iY + m_nFontFootHeight + 2 + (ADD_FOOT_HEIGHT>>1)+m_cBoxFrame.iY, ButtonWidth- 53, g_Locale->getText((m_nFootButtons & mbCancel) ? LOCALE_MESSAGEBOX_CANCEL : LOCALE_MESSAGEBOX_BACK), (CFBWindow::color_t)color);
|
||||
@@ -484,7 +484,7 @@ void CMsgBox::refreshBorder(void)
|
||||
m_cBoxFrame.iHeight - m_nWindowFrameBorderWidth+m_cBoxFrame.iY - RADIUS_LARGE,
|
||||
m_cBoxFrame.iWidth - m_nWindowFrameBorderWidth - RADIUS_LARGE,
|
||||
m_nWindowFrameBorderWidth + RADIUS_LARGE,
|
||||
COL_INFOBAR_SHADOW_PLUS_0,
|
||||
COL_SHADOW_PLUS_0,
|
||||
RADIUS_LARGE, CORNER_BOTTOM_LEFT);
|
||||
|
||||
//draw right shadow
|
||||
@@ -492,7 +492,7 @@ void CMsgBox::refreshBorder(void)
|
||||
m_nWindowFrameBorderWidth+m_cBoxFrame.iY,
|
||||
m_nWindowFrameBorderWidth + RADIUS_LARGE,
|
||||
m_cBoxFrame.iHeight - m_nWindowFrameBorderWidth,
|
||||
COL_INFOBAR_SHADOW_PLUS_0,
|
||||
COL_SHADOW_PLUS_0,
|
||||
RADIUS_LARGE, CORNER_RIGHT);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user