From 75fe6e407d416aa03d1f318f16f7f201c6fe030a Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 10 Oct 2016 14:19:54 +0200 Subject: [PATCH] - colors: add COL_FRAME wrapper --- src/gui/audioplayer.cpp | 6 +++--- src/gui/channellist.cpp | 2 +- src/gui/color.h | 3 +++ src/gui/components/cc_detailsline.cpp | 2 +- src/gui/components/cc_detailsline.h | 2 +- src/gui/components/cc_draw.cpp | 2 +- src/gui/components/cc_extra.h | 16 ++++++++-------- src/gui/components/cc_frm.h | 2 +- src/gui/components/cc_frm_chain.h | 2 +- src/gui/components/cc_frm_ext_text.h | 4 ++-- src/gui/components/cc_frm_footer.cpp | 4 ++-- src/gui/components/cc_frm_footer.h | 2 +- src/gui/components/cc_frm_header.cpp | 2 +- src/gui/components/cc_frm_header.h | 4 ++-- src/gui/components/cc_frm_icons.h | 4 ++-- src/gui/components/cc_frm_slider.h | 2 +- src/gui/components/cc_frm_window.h | 10 +++++----- src/gui/components/cc_item.cpp | 2 +- src/gui/components/cc_item_infobox.h | 2 +- src/gui/components/cc_item_picture.h | 12 ++++++------ src/gui/components/cc_item_shapes.h | 4 ++-- src/gui/components/cc_item_text.h | 6 +++--- src/gui/infoclock.cpp | 2 +- src/gui/lua/lua_api_version.h | 2 +- src/gui/lua/lua_cc_header.cpp | 2 +- src/gui/lua/lua_cc_picture.cpp | 2 +- src/gui/lua/lua_cc_text.cpp | 2 +- src/gui/lua/lua_cc_window.cpp | 2 +- src/gui/lua/luainstance.cpp | 2 ++ src/gui/timeosd.cpp | 4 ++-- src/gui/upnpbrowser.cpp | 2 +- src/gui/widget/keyboard_input.cpp | 2 +- src/gui/widget/menue.cpp | 6 +++--- 33 files changed, 64 insertions(+), 59 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 6a10fa3b4..e794bcacb 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -768,7 +768,7 @@ int CAudioPlayerGui::show() int y1=(g_settings.screen_EndY- g_settings.screen_StartY)/2 + g_settings.screen_StartY; int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); w = std::max(w, g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(selectedKey)); - m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6, RADIUS_SMALL); + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_FRAME_PLUS_0, RADIUS_SMALL); m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0, RADIUS_SMALL); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP] ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED_TEXT); @@ -1730,7 +1730,7 @@ void CAudioPlayerGui::paintInfo() title_height -= m_fheight; m_frameBuffer->paintBoxRel(m_x + 1, m_y + 1 , m_width - 2, title_height - 12, COL_MENUCONTENTSELECTED_PLUS_0, c_rad_mid); - m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, title_height - 10, 2, COL_MENUCONTENT_PLUS_6, c_rad_mid); + m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, title_height - 10, 2, COL_FRAME_PLUS_0, c_rad_mid); paintCover(); @@ -2272,7 +2272,7 @@ bool CAudioPlayerGui::getNumericInput(neutrino_msg_t& msg, int& val) { sprintf(str, "%d", val); int w = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(str); int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); - m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6); + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_FRAME_PLUS_0); m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 1, str, COL_MENUCONTENTSELECTED_TEXT); while (true) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 82518bc4c..440aef91b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1537,7 +1537,7 @@ void CChannelList::paintDetails(int index) bool colored_event_N = (g_settings.theme.colored_events_channellist == 2); frameBuffer->paintBoxRel(x+1, y + height + 1, full_width-2, info_height - 2, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE);//round - frameBuffer->paintBoxFrame(x, y + height, full_width, info_height, 2, COL_MENUCONTENT_PLUS_6, RADIUS_LARGE); + frameBuffer->paintBoxFrame(x, y + height, full_width, info_height, 2, COL_FRAME_PLUS_0, RADIUS_LARGE); if ((*chanlist).empty()) return; diff --git a/src/gui/color.h b/src/gui/color.h index f87bdd8f6..86efc7bbd 100644 --- a/src/gui/color.h +++ b/src/gui/color.h @@ -119,6 +119,9 @@ #define COL_INFOCLOCK_TEXT (CFrameBuffer::getInstance()->realcolor[(COL_NEUTRINO_TEXT + 15)]) #endif +// some wrappers to get more readability +#define COL_FRAME COL_MENUCONTENT_PLUS_6 +#define COL_FRAME_PLUS_0 COL_FRAME int convertSetupColor2RGB(unsigned char r, unsigned char g, unsigned char b); int convertSetupAlpha2Alpha(unsigned char alpha); diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 39f6143da..760b21fd6 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -143,6 +143,6 @@ void CComponentsDetailLine::paint(bool do_save_bg) //so you can ensure correct applied system colors in relevant objects with unchanged instances. void CComponentsDetailLine::syncSysColors() { - col_body = COL_MENUCONTENT_PLUS_6; + col_body = COL_FRAME_PLUS_0; col_shadow = COL_SHADOW_PLUS_0; } diff --git a/src/gui/components/cc_detailsline.h b/src/gui/components/cc_detailsline.h index 37d01e4f0..dfea467bd 100644 --- a/src/gui/components/cc_detailsline.h +++ b/src/gui/components/cc_detailsline.h @@ -57,7 +57,7 @@ class CComponentsDetailLine : public CComponents public: CComponentsDetailLine( const int& x_pos = 1,const int& y_pos_top = 1, const int& y_pos_down = 1, const int& h_mark_top_ = CC_HEIGHT_MIN , const int& h_mark_down_ = CC_HEIGHT_MIN, - fb_pixel_t color_line = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_line = COL_FRAME_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ~CComponentsDetailLine(); ///set colors diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index 8893cc73c..812157608 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -39,7 +39,7 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha) col_body = col_body_old = COL_MENUCONTENT_PLUS_0; col_shadow = col_shadow_old = COL_SHADOW_PLUS_0; - col_frame = col_frame_old = COL_MENUCONTENT_PLUS_6; + col_frame = col_frame_old = COL_FRAME_PLUS_0; col_frame_sel = col_frame_sel_old = COL_MENUCONTENTSELECTED_PLUS_0; fr_thickness = fr_thickness_old = 0; diff --git a/src/gui/components/cc_extra.h b/src/gui/components/cc_extra.h index d8311e67f..68147e1b0 100644 --- a/src/gui/components/cc_extra.h +++ b/src/gui/components/cc_extra.h @@ -61,7 +61,7 @@ * @li ColorGradient::light * @li ColorGradient::normal (default) * @li CFrameBuffer::advanced -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -86,7 +86,7 @@ bool paintBoxRel( const int& x, const int& gradient_direction = CFrameBuffer::gradientVertical, const int& gradient_intensity = CColorGradient::normal, const int& w_frame = 0, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); @@ -108,7 +108,7 @@ bool paintBoxRel( const int& x, * @li CORNER_LEFT * @li CORNER_BOTTOM * @li CORNER_ALL -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -129,7 +129,7 @@ bool paintBoxRel0( const int& x, const int& radius = 0, const int& corner_type = CORNER_NONE, const int& w_frame = 0, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); @@ -173,7 +173,7 @@ bool paintBoxRel0( const int& x, * @li ColorGradient::light * @li ColorGradient::normal (default) * @li CFrameBuffer::advanced -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -204,7 +204,7 @@ bool paintTextBoxRel( const std::string& text, const int& gradient_sec_col = COL_MENUCONTENT_PLUS_0, const int& gradient_direction = CFrameBuffer::gradientVertical, const int& gradient_intensity = CColorGradient::normal, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); @@ -248,7 +248,7 @@ bool paintTextBoxRel( const std::string& text, * @li ColorGradient::light * @li ColorGradient::normal (default) * @li CFrameBuffer::advanced -* @param[in] color_frame color of frame around box, default = COL_MENUCONTENT_PLUS_6 +* @param[in] color_frame color of frame around box, default = COL_FRAME_PLUS_0 * @param[in] shadow_mode enable/disable shadow behind box, default = CC_SHADOW_OFF * @param[in] color_shadow color of shadow, default = COL_SHADOW_PLUS_0 * @@ -270,7 +270,7 @@ bool paintImage( const std::string& image_name, const fb_pixel_t& color_body = 0, const int& radius = 0, const int& corner_type = CORNER_NONE, - const fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + const fb_pixel_t& color_frame = COL_FRAME_PLUS_0, int shadow_mode = CC_SHADOW_OFF, const fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); #endif diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index 3e678bfa7..2efc89bf5 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -66,7 +66,7 @@ class CComponentsForm : public CComponentsItem CComponentsForm( const int x_pos = 0, const int y_pos = 0, const int w = 800, const int h = 600, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); virtual ~CComponentsForm(); diff --git a/src/gui/components/cc_frm_chain.h b/src/gui/components/cc_frm_chain.h index 6b6e7b5c2..a33f63ed8 100644 --- a/src/gui/components/cc_frm_chain.h +++ b/src/gui/components/cc_frm_chain.h @@ -67,7 +67,7 @@ class CComponentsFrmChain : public CComponentsForm int direction = CC_DIR_X, CComponentsForm* parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t& color_frame = COL_FRAME_PLUS_0, fb_pixel_t& color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsFrmChain(); //inherited from CComponentsForm diff --git a/src/gui/components/cc_frm_ext_text.h b/src/gui/components/cc_frm_ext_text.h index 769d1b284..20ebed85e 100644 --- a/src/gui/components/cc_frm_ext_text.h +++ b/src/gui/components/cc_frm_ext_text.h @@ -84,7 +84,7 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen int shadow_mode = CC_SHADOW_OFF, fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT, fb_pixel_t text_color = COL_MENUCONTENT_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsExtTextForm(); //inherited from CComponentsForm @@ -151,7 +151,7 @@ class CComponentsExtTextFormLocalized : public CComponentsExtTextForm int shadow_mode = CC_SHADOW_OFF, fb_pixel_t label_color = COL_MENUCONTENTINACTIVE_TEXT, fb_pixel_t text_color = COL_MENUCONTENT_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); }; #endif diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index c895c45da..0aa6f12c6 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -36,7 +36,7 @@ using namespace std; CComponentsFooter::CComponentsFooter(CComponentsForm* parent) { //CComponentsFooter - initVarFooter(1, 1, 0, 0, 0, parent, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, COL_MENUFOOT_PLUS_0, COL_SHADOW_PLUS_0); + initVarFooter(1, 1, 0, 0, 0, parent, CC_SHADOW_OFF, COL_FRAME_PLUS_0, COL_MENUFOOT_PLUS_0, COL_SHADOW_PLUS_0); } CComponentsFooter::CComponentsFooter( const int& x_pos, const int& y_pos, const int& w, const int& h, @@ -116,7 +116,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont //footer as primary container (in this context '=this') and the parent for the button label container (chain object), //button label container (chain object) itself is concurrent the parent object for button objects. if (chain == NULL){ - chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, col_body); + chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_FRAME_PLUS_0, col_body); chain->setCorner(this->corner_rad, this->corner_type); chain->doPaintBg(false); } diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index b10ac8c8d..bf9a16e2a 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -85,7 +85,7 @@ class CComponentsFooter : public CComponentsHeader const int& buttons = 0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUFOOT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index aad2e97d8..69d88a173 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -43,7 +43,7 @@ using namespace std; CComponentsHeader::CComponentsHeader(CComponentsForm* parent) { //CComponentsHeader - initVarHeader(1, 1, 0, 0, "", "", 0, parent, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); + initVarHeader(1, 1, 0, 0, "", "", 0, parent, CC_SHADOW_OFF, COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); } CComponentsHeader::CComponentsHeader( const int& x_pos, const int& y_pos, const int& w, const int& h, diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 178520b42..d30280da8 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -124,7 +124,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen const int& buttons = 0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -262,7 +262,7 @@ class CComponentsHeaderLocalized : public CComponentsHeader const int& buttons = 0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); }; diff --git a/src/gui/components/cc_frm_icons.h b/src/gui/components/cc_frm_icons.h index 16f162345..23ebf90be 100644 --- a/src/gui/components/cc_frm_icons.h +++ b/src/gui/components/cc_frm_icons.h @@ -37,7 +37,7 @@ class CComponentsIconForm : public CComponentsFrmChain const std::vector &v_icon_names, CComponentsForm* parent, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -47,7 +47,7 @@ class CComponentsIconForm : public CComponentsFrmChain const std::vector &v_icon_names, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsIconForm(); //inherited from CComponentsForm diff --git a/src/gui/components/cc_frm_slider.h b/src/gui/components/cc_frm_slider.h index a5e06dcd9..afa7a13bf 100644 --- a/src/gui/components/cc_frm_slider.h +++ b/src/gui/components/cc_frm_slider.h @@ -67,7 +67,7 @@ class CComponentsSlider : public CComponentsForm const int& max_value = 100, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t& color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t& color_frame = COL_FRAME_PLUS_0, fb_pixel_t& color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsSlider(); //inherited from CComponentsForm diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index fe031b2d7..212db8ef7 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -110,7 +110,7 @@ class CComponentsWindow : public CComponentsForm const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///initialize width and height @@ -135,7 +135,7 @@ class CComponentsWindow : public CComponentsForm const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -145,7 +145,7 @@ class CComponentsWindow : public CComponentsForm const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -231,7 +231,7 @@ class CComponentsWindowMax : public CComponentsWindow CComponentsWindowMax( const std::string& caption, const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); @@ -239,7 +239,7 @@ class CComponentsWindowMax : public CComponentsWindow CComponentsWindowMax( neutrino_locale_t locale_caption, const std::string& iconname = "", CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); }; diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 4b6e56e9c..2e2f10891 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -148,7 +148,7 @@ void CComponentsItem::syncSysColors() { col_body = COL_MENUCONTENT_PLUS_0; col_shadow = COL_SHADOW_PLUS_0; - col_frame = COL_MENUCONTENT_PLUS_6; + col_frame = COL_FRAME_PLUS_0; } //returns current item element type, if no available, return -1 as unknown type diff --git a/src/gui/components/cc_item_infobox.h b/src/gui/components/cc_item_infobox.h index 19ea2dfa6..29a3a1c8e 100644 --- a/src/gui/components/cc_item_infobox.h +++ b/src/gui/components/cc_item_infobox.h @@ -72,7 +72,7 @@ class CComponentsInfoBox : public CComponentsText CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t color_text = COL_MENUCONTENT_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); diff --git a/src/gui/components/cc_item_picture.h b/src/gui/components/cc_item_picture.h index 72605f058..3aab7e11b 100644 --- a/src/gui/components/cc_item_picture.h +++ b/src/gui/components/cc_item_picture.h @@ -112,7 +112,7 @@ class CComponentsPicture : public CComponentsItem const std::string& image_name, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_NONE); @@ -128,7 +128,7 @@ class CComponentsPicture : public CComponentsItem const std::string& image_name, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_NONE); @@ -196,7 +196,7 @@ class CComponentsPictureScalable : public CComponentsPicture const std::string& image_name, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_NONE) @@ -231,7 +231,7 @@ class CComponentsChannelLogo : public CComponentsPicture const uint64_t& channelId =0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_BLACK); @@ -247,7 +247,7 @@ class CComponentsChannelLogo : public CComponentsPicture const uint64_t& channelId =0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_BLACK); @@ -280,7 +280,7 @@ class CComponentsChannelLogoScalable : public CComponentsChannelLogo const uint64_t& channelId =0, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_background = 0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int transparent = CFrameBuffer::TM_BLACK) diff --git a/src/gui/components/cc_item_shapes.h b/src/gui/components/cc_item_shapes.h index 9b4c26df4..56e8f0295 100644 --- a/src/gui/components/cc_item_shapes.h +++ b/src/gui/components/cc_item_shapes.h @@ -47,7 +47,7 @@ class CComponentsShapeCircle : public CComponentsItem CComponentsShapeCircle( const int x_pos, const int y_pos, const int diam, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///set property: diam inline void setDiam(const int& diam){d=width=height=diam, corner_rad=d/2;}; @@ -64,7 +64,7 @@ class CComponentsShapeSquare : public CComponentsItem CComponentsShapeSquare( const int x_pos, const int y_pos, const int w, const int h, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); }; diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index 344f99b2a..f3cc48f4e 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -109,7 +109,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox const int& font_style = CComponentsText::FONT_STYLE_REGULAR, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_text = COL_MENUCONTENT_TEXT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_text = COL_MENUCONTENT_TEXT, fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsText( CComponentsForm *parent, const int x_pos = 10, const int y_pos = 10, const int w = 150, const int h = 50, @@ -118,7 +118,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox Font* font_text = NULL, const int& font_style = CComponentsText::FONT_STYLE_REGULAR, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_text = COL_MENUCONTENT_TEXT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_text = COL_MENUCONTENT_TEXT, fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); virtual ~CComponentsText(); @@ -254,7 +254,7 @@ class CComponentsLabel : public CComponentsText CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, fb_pixel_t color_text = COL_MENUCONTENTINACTIVE_TEXT, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, + fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsText(x_pos, y_pos, w, h, text, mode, font_text, font_style, parent, shadow_mode, color_text, color_frame, color_body, color_shadow) diff --git a/src/gui/infoclock.cpp b/src/gui/infoclock.cpp index bd28a7f21..a3db1f607 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -54,7 +54,7 @@ void CInfoClock::initCCLockItems() paint_bg = g_settings.infoClockBackground; //use current theme colors - setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); + setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); //set text color if (paint_bg){ diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 57f01d0ce..a374cc215 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 61 +#define LUA_API_VERSION_MINOR 62 diff --git a/src/gui/lua/lua_cc_header.cpp b/src/gui/lua/lua_cc_header.cpp index fa68852ee..d75ef646e 100644 --- a/src/gui/lua/lua_cc_header.cpp +++ b/src/gui/lua/lua_cc_header.cpp @@ -74,7 +74,7 @@ int CLuaInstCCHeader::CCHeaderNew(lua_State *L) lua_Integer shadow_mode = CC_SHADOW_OFF; std::string caption, icon; - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_body = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; diff --git a/src/gui/lua/lua_cc_picture.cpp b/src/gui/lua/lua_cc_picture.cpp index b383bd79b..52e99c701 100644 --- a/src/gui/lua/lua_cc_picture.cpp +++ b/src/gui/lua/lua_cc_picture.cpp @@ -78,7 +78,7 @@ int CLuaInstCCPicture::CCPictureNew(lua_State *L) lua_Integer x=10, y=10, dx=100, dy=100; std::string image_name = ""; lua_Integer alignment = 0; - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_background = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index 60f23f78c..7e1ea5d36 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -83,7 +83,7 @@ int CLuaInstCCText::CCTextNew(lua_State *L) lua_Integer mode = CTextBox::AUTO_WIDTH; lua_Integer font_text = SNeutrinoSettings::FONT_TYPE_MENU; lua_Unsigned color_text = (lua_Unsigned)COL_MENUCONTENT_TEXT; - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_body = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index df87bb815..7dc5e77bd 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -73,7 +73,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) lua_assert(lua_istable(L,1)); std::string name, icon = std::string(NEUTRINO_ICON_INFO); - lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6; + lua_Unsigned color_frame = (lua_Unsigned)COL_FRAME_PLUS_0; lua_Unsigned color_body = (lua_Unsigned)COL_MENUCONTENT_PLUS_0; lua_Unsigned color_shadow = (lua_Unsigned)COL_SHADOW_PLUS_0; std::string tmp1 = "false"; diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 203ef7d95..f355df58c 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -171,6 +171,7 @@ static void set_lua_variables(lua_State *L) { "MENUCONTENTSELECTED", MAGIC_COLOR | (COL_MENUCONTENTSELECTED) }, { "MENUCONTENTINACTIVE", MAGIC_COLOR | (COL_MENUCONTENTINACTIVE) }, { "MENUFOOT", MAGIC_COLOR | (COL_MENUFOOT) }, + { "FRAME", MAGIC_COLOR | (COL_FRAME) }, { "BACKGROUND", MAGIC_COLOR | (COL_BACKGROUND) }, { "DARK_RED", MAGIC_COLOR | (COL_DARK_RED0) }, { "DARK_GREEN", MAGIC_COLOR | (COL_DARK_GREEN0) }, @@ -217,6 +218,7 @@ static void set_lua_variables(lua_State *L) { "MENUCONTENTSELECTED_PLUS_2", (lua_Unsigned) (COL_MENUCONTENTSELECTED_PLUS_2) }, { "MENUCONTENTINACTIVE_PLUS_0", (lua_Unsigned) (COL_MENUCONTENTINACTIVE_PLUS_0) }, { "MENUFOOT_PLUS_0", (lua_Unsigned) (COL_MENUFOOT_PLUS_0) }, + { "FRAME_PLUS_0", (lua_Unsigned) (COL_FRAME_PLUS_0) }, { NULL, 0 } }; diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index dd62f3659..c15a03944 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -48,7 +48,7 @@ void CTimeOSD::Init() m_mode = MODE_HIDE; //use current theme colors - setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); + setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); //set text color if (paint_bg){ @@ -100,7 +100,7 @@ void CTimeOSD::show(time_t time_show, bool force) return; m_time_show = time_show; - setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); //use current theme colors + setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0); //use current theme colors paint_bg = true; if (g_settings.infoClockBackground) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index bc59507e2..d2592b97b 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -89,7 +89,7 @@ void CUpnpBrowserGui::Init() topbox.enableFrame(true, 2); topbox.setCorner(RADIUS_LARGE); - topbox.setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0, COL_MENUHEAD_TEXT); + topbox.setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0, COL_MENUHEAD_TEXT); topbox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]); topbox.enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Head_gradient_direction); topbox.enableShadow(CC_SHADOW_ON, -1, true); diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp index 297e4e61b..3e6705a42 100644 --- a/src/gui/widget/keyboard_input.cpp +++ b/src/gui/widget/keyboard_input.cpp @@ -761,7 +761,7 @@ void CKeyboardInput::paintKey(int row, int column) int radius = CORNER_RADIUS_SMALL; frameBuffer->paintBoxRel(xpos, ypos, key_w, key_h, bgcolor, radius); - frameBuffer->paintBoxFrame(xpos, ypos, key_w, key_h, KEY_FRAME_WIDTH, COL_MENUCONTENT_PLUS_6, radius); + frameBuffer->paintBoxFrame(xpos, ypos, key_w, key_h, KEY_FRAME_WIDTH, COL_FRAME_PLUS_0, radius); if (keyboard[row][column].empty()) return; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index ef47e2f33..bb68b82d8 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -253,7 +253,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text fb_pixel_t right_frame_col, right_bg_col; if (active) { right_bg_col = right_bgcol; - right_frame_col = COL_MENUCONTENT_PLUS_6; + right_frame_col = COL_FRAME_PLUS_0; } else { right_bg_col = COL_MENUCONTENTINACTIVE_TEXT; @@ -1241,7 +1241,7 @@ void CMenuWidget::paint() header->enableShadow(CC_SHADOW_RIGHT); header->setOffset(10); } - header->setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); + header->setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); header->setCaptionColor(COL_MENUHEAD_TEXT); header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0); header->enableGradientBgCleanUp(savescreen); @@ -1479,7 +1479,7 @@ void CMenuWidget::paintHint(int pos) info_box->removeLineBreaks(str); info_box->setText(str, CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT], COL_MENUCONTENT_TEXT); info_box->setCorner(RADIUS_LARGE); - info_box->setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUCONTENTDARK_PLUS_0); + info_box->setColorAll(COL_FRAME_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_MENUFOOT_PLUS_0, g_settings.theme.menu_Hint_gradient_direction);// COL_MENUFOOT_PLUS_0 is default footer color