diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index b3dff92cc..f3ba32775 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -804,7 +804,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_1, RADIUS_SMALL); //NI + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_FRAME_PLUS_0, RADIUS_SMALL); //NI m_frameBuffer->paintBoxRel(x1 - 6, y1 - h - 4, w + 12, h + 8, COL_MENUCONTENTSELECTED_PLUS_0, RADIUS_SMALL); //NI g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP] ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED_TEXT); @@ -1769,7 +1769,7 @@ void CAudioPlayerGui::paintInfo() title_height -= m_fheight; m_frameBuffer->paintBoxRel(m_x, m_y, m_width, title_height - 10, COL_MENUHEAD_PLUS_0, c_rad_mid); //NI - m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, title_height - 10, 1, COL_MENUCONTENT_PLUS_1, c_rad_mid); //NI + m_frameBuffer->paintBoxFrame(m_x, m_y, m_width, title_height - 10, 1, COL_FRAME_PLUS_0, c_rad_mid); //NI paintCover(); @@ -1840,14 +1840,14 @@ void CAudioPlayerGui::paint() int ypos = m_y + m_title_height + m_theight; int sb = m_fheight * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc = ((m_playlist.size() - 1) / tmp_max) + 1; int sbs = (m_selected / tmp_max); if (sbc < 1) sbc = 1; - m_frameBuffer->paintBoxRel(m_x + m_width - 13, ypos + 2 + sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + m_frameBuffer->paintBoxRel(m_x + m_width - 13, ypos + 2 + sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL); } paintInfo(); @@ -1864,13 +1864,16 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) { int xpos = m_x - ConnectLineBox_Width; int ypos1 = m_y + m_title_height + m_theight + pos*m_fheight; - int ypos2 = m_y + (m_height - m_info_height) + INFO_BOX_Y_OFFSET; + int ypos2 = m_y + (m_height - m_info_height) + OFFSET_INTER; int ypos1a = ypos1 + (m_fheight / 2); int ypos2a = ypos2 + (m_info_height / 2); // clear details line if (dline != NULL) + { dline->kill(); + dline = NULL; + } // paint Line if detail info (and not valid list pos) and info box if (!m_playlist.empty() && (pos >= 0)) @@ -1885,7 +1888,7 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) ibox = new CComponentsInfoBox(m_x, ypos2, m_width, m_info_height); ibox->setFrameThickness(1); //NI ibox->setCorner(RADIUS_LARGE); - ibox->setColorFrame(COL_MENUCONTENT_PLUS_1); //NI + ibox->setColorFrame(COL_FRAME_PLUS_0); ibox->setColorBody(COL_MENUCONTENTDARK_PLUS_0); ibox->forceTextPaint(false); } @@ -2312,7 +2315,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_1); //NI + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_FRAME_PLUS_0); //NI m_frameBuffer->paintBoxRel(x1 - 6, y1 - h - 4, w + 12, h + 8, COL_MENUCONTENTSELECTED_PLUS_0); //NI g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 1, str, COL_MENUCONTENTSELECTED_TEXT); while (true) diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 821c1ae3a..8d5f5f64c 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -117,7 +117,7 @@ void CBEBouquetWidget::paint() int ypos = y+ theight; int sb = iheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((Bouquets->size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); @@ -125,7 +125,7 @@ void CBEBouquetWidget::paint() sbc = 1; //scrollbar - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } void CBEBouquetWidget::paintHead() diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 8f8a9b1d1..c50eebd95 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -157,7 +157,7 @@ void CBEChannelWidget::paint() int ypos = y+ theight; int sb = iheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((Channels->size()- 1)/ listmaxshow)+ 1; if (sbc < 1) @@ -167,7 +167,7 @@ void CBEChannelWidget::paint() int sbs= (selected/listmaxshow); if (sbh) - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_SCROLLBAR_ACTIVE_PLUS_0); } void CBEChannelWidget::paintHead() @@ -228,7 +228,7 @@ void CBEChannelWidget::initItem2DetailsLine (int pos, int /*ch_index*/) { int xpos = x - ConnectLineBox_Width; int ypos1 = y + theight+0 + pos*iheight; - int ypos2 = y + height + INFO_BOX_Y_OFFSET; + int ypos2 = y + height + OFFSET_INTER; int ypos1a = ypos1 + (fheight/2); int ypos2a = ypos2 + (info_height/2); diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 4ba413d75..4ec7621fc 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -290,7 +290,7 @@ void CBEChannelSelectWidget::initItem2DetailsLine (int pos, int /*ch_index*/) { int xpos = x - ConnectLineBox_Width; int ypos1 = y + theight+0 + pos*iheight; - int ypos2 = y + height + INFO_BOX_Y_OFFSET; + int ypos2 = y + height + OFFSET_INTER; int ypos1a = ypos1 + (fheight/2); int ypos2a = ypos2 + (info_height/2); diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index bcbe278cb..57f48fde3 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -468,7 +468,7 @@ void CBookmarkManager::paint() { int ypos = y+ theight; int sb = 2*fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) tmp_max = 1; @@ -476,7 +476,7 @@ void CBookmarkManager::paint() if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } paintFoot(); diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 53cdf23b1..578ab9801 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -726,10 +726,10 @@ void CBouquetList::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int listmaxshow_tmp = listmaxshow ? listmaxshow : 1;//avoid division by zero int sbc= ((bsize - 1)/ listmaxshow_tmp)+ 1; /* bsize is > 0, so sbc is also > 0 */ int sbs= (selected/listmaxshow_tmp); - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index c2496e6f1..709069ca0 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -49,6 +49,7 @@ #include #include +#include #include #include #include @@ -64,7 +65,6 @@ #include #include #include -#include #include #include @@ -865,6 +865,7 @@ int CChannelList::show() displayList = !displayList; if (displayList) displayNext = !displayNext; +//NI #if 0 if (g_settings.channellist_additional) displayList = !displayList; @@ -1550,7 +1551,7 @@ void CChannelList::paintDetails(int index) bool colored_event_N = (g_settings.theme.colored_events_channellist == 2); frameBuffer->paintBoxRel(x, y + height, full_width, info_height, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE);//round //NI - frameBuffer->paintBoxFrame(x, y + height, full_width, info_height, 1, COL_MENUCONTENT_PLUS_1, RADIUS_LARGE); //NI + frameBuffer->paintBoxFrame(x, y + height, full_width, info_height, 1, COL_FRAME_PLUS_0, RADIUS_LARGE); //NI if ((*chanlist).empty()) return; @@ -1864,42 +1865,65 @@ void CChannelList::paintItem(int pos, const bool firstpaint) int ypos = y+ theight + pos*fheight; fb_pixel_t color; fb_pixel_t bgcolor; - bool iscurrent = true; + bool is_available = true; bool paintbuttons = false; unsigned int curr = liststart + pos; - fb_pixel_t c_rad_small = 0; + fb_pixel_t c_radius = 0; - if(curr < (*chanlist).size()) { + if (curr < (*chanlist).size()) + { if (edit_state) - iscurrent = !((*chanlist)[curr]->flags & CZapitChannel::NOT_PRESENT); + is_available = !((*chanlist)[curr]->flags & CZapitChannel::NOT_PRESENT); else - iscurrent = SameTP((*chanlist)[curr]); + is_available = SameTP((*chanlist)[curr]); } - if(selected >= (*chanlist).size()) + if (selected >= (*chanlist).size()) selected = (*chanlist).size()-1; - if (curr == selected) { - color = COL_MENUCONTENTSELECTED_TEXT; - bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; + unsigned int is_tuned = (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber() && new_zap_mode != 2 /*active*/); + + if (curr == selected) + { + if (is_tuned) + { + color = COL_MENUCONTENTSELECTED_TEXT_PLUS_2; + bgcolor = COL_MENUCONTENTSELECTED_PLUS_2; + } + else + { + color = COL_MENUCONTENTSELECTED_TEXT; + bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; + } paintItem2DetailsLine (pos); paintDetails(curr); paintAdditionals(curr); - c_rad_small = RADIUS_LARGE; + c_radius = RADIUS_LARGE; paintbuttons = true; } - else if (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber() && new_zap_mode != 2/*active*/) + else { - color = COL_MENUCONTENT_TEXT; //NI - bgcolor = COL_MENUCONTENT_PLUS_1; //NI - c_rad_small = RADIUS_LARGE; - } else { - color = iscurrent ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT; - bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; + if (is_tuned) + { + //NI + color = COL_MENUCONTENT_TEXT; + bgcolor = COL_MENUCONTENT_PLUS_1; +//NI +#if 0 + color = !displayNext ? COL_MENUCONTENT_TEXT_PLUS_2 : COL_MENUCONTENTINACTIVE_TEXT; + bgcolor = !displayNext ? COL_MENUCONTENT_PLUS_2 : COL_MENUCONTENTINACTIVE_PLUS_0; +#endif + c_radius = RADIUS_LARGE; + } + else + { + color = is_available ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT; + bgcolor = is_available ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; + } } if(!firstpaint || (curr == selected) || getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber()) - frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_rad_small); + frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_radius); if(curr < (*chanlist).size()) { char nameAndDescription[255]; @@ -1957,7 +1981,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) //paint buttons if (paintbuttons) - paintButtonBar(iscurrent); + paintButtonBar(is_available); int icon_space = r_icon_w+s_icon_w; @@ -1982,32 +2006,21 @@ void CChannelList::paintItem(int pos, const bool firstpaint) l = snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->getName().c_str()); int pb_space = prg_offset - title_offset; - CProgressBar pb(x+5+numwidth + title_offset, ypos + fheight/4 + 2, pb_space + 2, fheight/2 - 4, - 0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0, COL_INFOBAR_PLUS_7, COL_INFOBAR_PLUS_3); + int pb_height = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getDigitHeight(); + CProgressBar pb(x+5+numwidth + title_offset, ypos + (fheight-pb_height)/2, pb_space + 2, pb_height, COL_MENUCONTENT_PLUS_0); pb.setType(CProgressBar::PB_TIMESCALE); pb.setDesign(g_settings.channellist_progressbar_design); pb.setCornerType(0); - pb.setFrameThickness(0); // no frame - pb.doPaintBg(false); // no background - int pb_max = pb_space - 4; - if (g_settings.progressbar_design != CProgressBar::PB_MONO) { - if (liststart + pos != selected) { - fb_pixel_t pbgcol = COL_MENUCONTENT_PLUS_2; //NI - if (pbgcol == bgcolor) - pbgcol = COL_MENUCONTENT_PLUS_0; - pb.setStatusColors(COL_MENUCONTENT_PLUS_3, pbgcol); - } else { - fb_pixel_t pbgcol = COL_MENUCONTENTSELECTED_PLUS_1; //NI - if (pbgcol == bgcolor) - pbgcol = COL_MENUCONTENT_PLUS_0; - pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, pbgcol); - } - } else { - if (liststart + pos != selected) - pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_2); //NI - else - pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, COL_MENUCONTENTSELECTED_PLUS_1); //NI + pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1); + int pb_frame = 0; + if (g_settings.channellist_progressbar_design == CProgressBar::PB_MONO && !g_settings.progressbar_gradient) + { + // add small frame to mono progressbars w/o gradient for a better visibility + pb_frame = 1; } + pb.setFrameThickness(pb_frame); + pb.doPaintBg(false); + int pb_max = pb_space - 4; if (!(p_event->description.empty())) { snprintf(nameAndDescription+l, sizeof(nameAndDescription)-l,g_settings.channellist_epgtext_align_right ? " ":" - "); @@ -2220,14 +2233,14 @@ void CChannelList::paintBody() const int ypos = y+ theight; const int sb = height - theight - footerHeight; // paint scrollbar over full height of main box - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int listmaxshow_tmp = listmaxshow ? listmaxshow : 1;//avoid division by zero int sbc= (((*chanlist).size()- 1)/ listmaxshow_tmp)+ 1; const int sbs= (selected/listmaxshow_tmp); if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); showChannelLogo(); if ((*chanlist).empty()) paintButtonBar(false); diff --git a/src/gui/color.h b/src/gui/color.h index 29b8a4077..3c3a537f3 100644 --- a/src/gui/color.h +++ b/src/gui/color.h @@ -121,6 +121,19 @@ #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 + +#define COL_SCROLLBAR_ACTIVE COL_MENUCONTENT_PLUS_3 +#define COL_SCROLLBAR_ACTIVE_PLUS_0 COL_SCROLLBAR_ACTIVE +#define COL_SCROLLBAR_PASSIVE COL_MENUCONTENT_PLUS_1 +#define COL_SCROLLBAR_PASSIVE_PLUS_0 COL_SCROLLBAR_PASSIVE + +#define COL_PROGRESSBAR_ACTIVE COL_MENUCONTENT_PLUS_7 +#define COL_PROGRESSBAR_ACTIVE_PLUS_0 COL_PROGRESSBAR_ACTIVE +#define COL_PROGRESSBAR_PASSIVE COL_MENUCONTENT_PLUS_1 +#define COL_PROGRESSBAR_PASSIVE_PLUS_0 COL_PROGRESSBAR_PASSIVE int convertSetupColor2RGB(unsigned char r, unsigned char g, unsigned char b); int convertSetupAlpha2Alpha(unsigned char alpha); diff --git a/src/gui/color_custom.h b/src/gui/color_custom.h new file mode 100644 index 000000000..2b3ccc800 --- /dev/null +++ b/src/gui/color_custom.h @@ -0,0 +1,60 @@ +#ifndef __color_custom__ +#define __color_custom__ + +#define COLOR_CUSTOM 0x0 +#ifdef FB_USE_PALETTE +/* +#define COL_WHITE (COLOR_CUSTOM + 0) +#define COL_RED (COLOR_CUSTOM + 1) +#define COL_GREEN (COLOR_CUSTOM + 2) +#define COL_BLUE (COLOR_CUSTOM + 3) +#define COL_YELLOW (COLOR_CUSTOM + 4) +#define COL_BLACK (COLOR_CUSTOM + 5) +*/ +#define COL_DARK_RED 0x02 +#define COL_DARK_GREEN 0x03 +#define COL_OLIVE 0x04 +#define COL_DARK_BLUE 0x05 +#define COL_LIGHT_GRAY 0x08 +#define COL_DARK_GRAY 0x09 +#define COL_RED 0x0A +#define COL_GREEN 0x0B +#define COL_YELLOW 0x0C +#define COL_BLUE 0x0D +#define COL_PURP 0x0E +#define COL_LIGHT_BLUE 0x0F +#define COL_WHITE 0x10 +#define COL_BLACK 0x11 +#else +#define COL_DARK_RED0 0x02 +#define COL_DARK_GREEN0 0x03 +#define COL_OLIVE0 0x04 +#define COL_DARK_BLUE0 0x05 +#define COL_LIGHT_GRAY0 0x08 +#define COL_DARK_GRAY0 0x09 +#define COL_RED0 0x0A +#define COL_GREEN0 0x0B +#define COL_YELLOW0 0x0C +#define COL_BLUE0 0x0D +#define COL_PURP0 0x0E +#define COL_LIGHT_BLUE0 0x0F +#define COL_WHITE0 0x10 +#define COL_BLACK0 0x11 + +#define COL_DARK_RED (CFrameBuffer::getInstance()->realcolor[0x02]) +#define COL_DARK_GREEN (CFrameBuffer::getInstance()->realcolor[0x03]) +#define COL_OLIVE (CFrameBuffer::getInstance()->realcolor[0x04]) +#define COL_DARK_BLUE (CFrameBuffer::getInstance()->realcolor[0x05]) +#define COL_LIGHT_GRAY (CFrameBuffer::getInstance()->realcolor[0x08]) +#define COL_DARK_GRAY (CFrameBuffer::getInstance()->realcolor[0x09]) +#define COL_RED (CFrameBuffer::getInstance()->realcolor[0x0A]) +#define COL_GREEN (CFrameBuffer::getInstance()->realcolor[0x0B]) +#define COL_YELLOW (CFrameBuffer::getInstance()->realcolor[0x0C]) +#define COL_BLUE (CFrameBuffer::getInstance()->realcolor[0x0D]) +#define COL_PURP (CFrameBuffer::getInstance()->realcolor[0x0E]) +#define COL_LIGHT_BLUE (CFrameBuffer::getInstance()->realcolor[0x0F]) +#define COL_WHITE (CFrameBuffer::getInstance()->realcolor[0x10]) +#define COL_BLACK (CFrameBuffer::getInstance()->realcolor[0x11]) +#endif + +#endif diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 95cf9cc47..5047247e2 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -146,6 +146,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_1; //NI + 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 3228b72b2..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_1, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); //NI + 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..1296e19d7 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; @@ -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; diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index ae5557d42..92178deb6 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -231,7 +231,7 @@ class CCDraw : public COSDFader, public CComponentsSignals ///set shadow color virtual void setColorShadow(fb_pixel_t color){col_shadow = color;} ///set all basic framebuffer element colors at once - ///Note: Possible color values are defined in "gui/color.h" and "gui/customcolor.h" + ///Note: Possible color values are defined in "gui/color.h" and "gui/color_custom.h" virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;}; ///set corner types 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.cpp b/src/gui/components/cc_frm.cpp index 6e2fc8920..69d1fb7d3 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -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; 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_button.cpp b/src/gui/components/cc_frm_button.cpp index e67bd73b6..b5fd5ddef 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include "cc_frm_button.h" @@ -100,7 +101,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); diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index eb754eef1..1b9123b41 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -103,7 +103,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -112,7 +112,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const neutrino_locale_t& caption_locale, @@ -121,7 +121,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h, const std::string& caption, @@ -130,7 +130,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_DARK_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ///set text color virtual void setButtonTextColor(fb_pixel_t text_color, fb_pixel_t text_color_disabled = COL_MENUCONTENTINACTIVE_TEXT){cc_btn_capt_col = text_color; cc_btn_capt_disable_col = text_color_disabled;} @@ -204,7 +204,7 @@ class CComponentsButtonRed : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_RED; @@ -215,7 +215,7 @@ class CComponentsButtonRed : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_RED, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_RED; @@ -235,7 +235,7 @@ class CComponentsButtonGreen : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_GREEN; @@ -246,7 +246,7 @@ class CComponentsButtonGreen : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_GREEN, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_GREEN; @@ -266,7 +266,7 @@ class CComponentsButtonYellow : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW; @@ -277,7 +277,7 @@ class CComponentsButtonYellow : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_YELLOW, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_YELLOW; @@ -297,7 +297,7 @@ class CComponentsButtonBlue : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_BLUE; @@ -308,7 +308,7 @@ class CComponentsButtonBlue : public CComponentsButton bool selected = false, bool enabled = true, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0) :CComponentsButton(x_pos, y_pos, w, h, caption_locale, NEUTRINO_ICON_BUTTON_BLUE, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_BUTTON_BLUE; 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_clock.cpp b/src/gui/components/cc_frm_clock.cpp index a6e0b773b..82c048943 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -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; diff --git a/src/gui/components/cc_frm_clock.h b/src/gui/components/cc_frm_clock.h index 74e859df9..c46dc0bad 100644 --- a/src/gui/components/cc_frm_clock.h +++ b/src/gui/components/cc_frm_clock.h @@ -102,7 +102,7 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen const int& interval_seconds = 1, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_LIGHT_GRAY, + 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, int font_style = CNeutrinoFonts::FONT_STYLE_BOLD diff --git a/src/gui/components/cc_frm_ext_text.h b/src/gui/components/cc_frm_ext_text.h index 769d1b284..aa148599f 100644 --- a/src/gui/components/cc_frm_ext_text.h +++ b/src/gui/components/cc_frm_ext_text.h @@ -73,7 +73,9 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen int shadow_mode, fb_pixel_t label_color, fb_pixel_t text_color, - fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow); + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow); public: ///advanced constructor for CComponentsExtTextForm, provides parameters for the most required properties, and caption as string @@ -84,7 +86,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 +153,9 @@ 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..0eec2443c 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -26,6 +26,7 @@ #endif #include +#include #include "cc_frm_footer.h" #include @@ -36,7 +37,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 +117,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 29f3cc91f..a5eb79cb5 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..5a32f62c0 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,8 +47,9 @@ 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_body = COL_MENUHEAD_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_MENUHEAD_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsIconForm(); //inherited from CComponentsForm void addIcon(const std::string& icon_name); diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp index 37a29c84d..a73cca5ca 100644 --- a/src/gui/components/cc_frm_scrollbar.cpp +++ b/src/gui/components/cc_frm_scrollbar.cpp @@ -63,7 +63,9 @@ CComponentsScrollBar::CComponentsScrollBar( const int &x_pos, const int &y_pos, const int& count, CComponentsForm* parent, int shadow_mode, - fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow) :CComponentsFrmChain(x_pos, y_pos, w, h, NULL, CC_DIR_Y, parent, shadow_mode, color_frame, color_body, color_shadow) { initVarSbForm(count); @@ -168,7 +170,7 @@ void CComponentsScrollBar::initSegments() item->setColBodyGradient(CColorGradient::gradientDark2Light2Dark, CFrameBuffer::gradientHorizontal); } else{ - item->setColorBody(COL_MENUCONTENT_PLUS_1); + item->setColorBody(COL_SCROLLBAR_PASSIVE_PLUS_0); item->disableColBodyGradient(); } } diff --git a/src/gui/components/cc_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h index 068b78e58..731e83df5 100644 --- a/src/gui/components/cc_frm_scrollbar.h +++ b/src/gui/components/cc_frm_scrollbar.h @@ -64,8 +64,9 @@ class CComponentsScrollBar : public CComponentsFrmChain const int& count = 1, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_3, - fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SCROLLBAR_ACTIVE_PLUS_0, + fb_pixel_t color_body = COL_SCROLLBAR_PASSIVE_PLUS_0, + fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); // ~CComponentsScrollBar(); //inherited from CComponentsForm ///set marked segment, 1st = 0, 2nd = 1 ... diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 4dc677e93..8677bf3e3 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -59,7 +59,9 @@ void CSignalBar::initVarSigBar(const int& xpos, const int& ypos, const int& w, c sb_scale_height = -1; dy_font = CNeutrinoFonts::getInstance(); - sb_caption_color= COL_INFOBAR_TEXT; + sb_caption_color= COL_MENUCONTENT_TEXT; + sb_active_color = COL_PROGRESSBAR_ACTIVE_PLUS_0; + sb_passive_color= COL_PROGRESSBAR_PASSIVE_PLUS_0; sb_val_mode = CTextBox::NO_AUTO_LINEBREAK | CTextBox::RIGHT; sb_lastsig = 0; @@ -109,6 +111,8 @@ void CSignalBar::initSBItems() //and set required color for text to name label CSignalBox *sbx = static_cast(cc_parent); sb_caption_color = sbx->getTextColor(); + sb_active_color = sbx->getActiveColor(); + sb_passive_color = sbx->getPassiveColor(); } //init items scale, value and name @@ -127,11 +131,11 @@ void CSignalBar::initSBarScale() int scale_y = (sb_item_height/2 - sb_scale_height/2); sb_scale->setDimensionsAll(fr_thickness, scale_y, sb_scale_width, sb_scale_height); sb_scale->setColorBody(col_body); - + sb_scale->setActiveColor(sb_active_color); + sb_scale->setPassiveColor(sb_passive_color); //add scale object to container if(!sb_scale->isAdded()) addCCItem(sb_scale); - } void CSignalBar::initSBarValue() @@ -182,7 +186,6 @@ void CSignalBar::initSBarName() sb_lbl->setTextColor(sb_caption_color); sb_lbl->setColorBody(col_body); - //add name label object to container if (!sb_lbl->isAdded()) addCCItem(sb_lbl); @@ -295,7 +298,9 @@ void CSignalBox::initVarSigBox() height = 3* SB_MIN_HEIGHT; sbx_bar_height = height/2; sbx_bar_x = corner_rad; - sbx_caption_color = COL_INFOBAR_TEXT; + sbx_caption_color = COL_MENUCONTENT_TEXT; + sbx_active_color = COL_PROGRESSBAR_ACTIVE_PLUS_0; + sbx_passive_color = COL_PROGRESSBAR_PASSIVE_PLUS_0; vertical = true; } @@ -316,12 +321,18 @@ void CSignalBox::initSignalItems() sbar->setDimensionsAll(sbar_x, 1, sbar_w, sbar_h); sbar->setFrontEnd(sbx_frontend); + sbar->setTextColor(sbx_caption_color); + sbar->setActiveColor(sbx_active_color); + sbar->setPassiveColor(sbx_passive_color); sbar->setCorner(0); sbar->setScaleHeight(scale_h); sbar->enableTboxSaveScreen(cc_txt_save_screen); snrbar->setDimensionsAll(vertical ? sbar_x : CC_APPEND, vertical ? CC_APPEND : 1, sbar_w, sbar_h); snrbar->setFrontEnd(sbx_frontend); + snrbar->setTextColor(sbx_caption_color); + snrbar->setActiveColor(sbx_active_color); + snrbar->setPassiveColor(sbx_passive_color); snrbar->setCorner(0); snrbar->setScaleHeight(scale_h); snrbar->enableTboxSaveScreen(cc_txt_save_screen); diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index b69516a6c..69ce46e09 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -69,6 +69,10 @@ class CSignalBar : public CComponentsForm, public CCTextScreen CNeutrinoFonts *dy_font; ///property: text color, see also setTextColor() fb_pixel_t sb_caption_color; + ///property: active color, see also setActiveColor() + fb_pixel_t sb_active_color; + ///property: passive color, see also setPassiveColor() + fb_pixel_t sb_passive_color; ///property: item top position int sb_item_top; @@ -121,6 +125,10 @@ class CSignalBar : public CComponentsForm, public CCTextScreen virtual void setTextFont(Font* font_text){sb_font = font_text;}; ///sets the caption color, see also property 'sb_caption_color' virtual void setTextColor(const fb_pixel_t& caption_color){ sb_caption_color = caption_color;}; + ///set active color, see also property 'sb_active_color' + virtual void setActiveColor(const fb_pixel_t& active_color){ sb_active_color = active_color;}; + ///set passive color, see also property 'sb_passive_color' + virtual void setPassiveColor(const fb_pixel_t& passive_color){ sb_passive_color = passive_color;}; ///assigns the height of scale virtual void setScaleHeight(const int& scale_height){sb_scale_height = scale_height;}; ///assigns the width of scale @@ -277,6 +285,10 @@ class CSignalBox : public CComponentsForm, public CCTextScreen int sbx_bar_x; ///property: text color, see also setTextColor() fb_pixel_t sbx_caption_color; + ///property: active color, see also setActiveColor() + fb_pixel_t sbx_active_color; + ///property: passive color, see also setPassiveColor() + fb_pixel_t sbx_passive_color; // true if vertical arrangement, false if horizontal bool vertical; @@ -306,6 +318,16 @@ class CSignalBox : public CComponentsForm, public CCTextScreen ///get caption color of signalbars, see also property 'sbx_caption_color' fb_pixel_t getTextColor(){return sbx_caption_color;}; + ///set active color of signalbars, see also property 'sbx_active_color' + void setActiveColor(const fb_pixel_t& active_color){ sbx_active_color = active_color;}; + ///get active color of signalbars, see also property 'sbx_active_color' + fb_pixel_t getActiveColor(){return sbx_active_color;}; + + ///set passive color of signalbars, see also property 'sbx_passive_color' + void setPassiveColor(const fb_pixel_t& passive_color){ sbx_passive_color = passive_color;}; + ///get passive color of signalbars, see also property 'sbx_passive_color' + fb_pixel_t getPassiveColor(){return sbx_passive_color;}; + ///paint items void paint(bool do_save_bg); 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.cpp b/src/gui/components/cc_frm_window.cpp index 682236278..6d52dd36f 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -300,9 +300,6 @@ void CComponentsWindow::initBody() ccw_body->setCornerType(CORNER_TOP); if (!ccw_show_footer) ccw_body->setCornerType(ccw_body->getCornerType() | CORNER_BOTTOM); - if (!ccw_show_header) - ccw_body->setCornerType(CORNER_TOP); - } } 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 98f0f4999..d8f2345c5 100644 --- a/src/gui/components/cc_item_infobox.h +++ b/src/gui/components/cc_item_infobox.h @@ -41,7 +41,6 @@ InfoBox has been originally intended for displaying text information or menue hi but is also usable like each other CCItems. */ -#define INFO_BOX_Y_OFFSET SHADOW_OFFSET //NI class CComponentsInfoBox : public CComponentsText { private: @@ -72,7 +71,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.cpp b/src/gui/components/cc_item_picture.cpp index ba35b446b..1fd538ac5 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -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; 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_progressbar.h b/src/gui/components/cc_item_progressbar.h index f5b03d164..6812c2aa4 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -105,8 +105,8 @@ class CProgressBar : public CComponentsItem fb_pixel_t color_frame = 0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, - const fb_pixel_t active_col = COL_INFOBAR_PLUS_7, - const fb_pixel_t passive_col = COL_INFOBAR_PLUS_3, + const fb_pixel_t active_col = COL_PROGRESSBAR_ACTIVE_PLUS_0, + const fb_pixel_t passive_col = COL_PROGRESSBAR_PASSIVE_PLUS_0, const int R = 40, const int G = 100, const int Y = 70, diff --git a/src/gui/components/cc_item_shapes.cpp b/src/gui/components/cc_item_shapes.cpp index d6c623b29..dffaca928 100644 --- a/src/gui/components/cc_item_shapes.cpp +++ b/src/gui/components/cc_item_shapes.cpp @@ -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; diff --git a/src/gui/components/cc_item_shapes.h b/src/gui/components/cc_item_shapes.h index 9b4c26df4..a1a48d97c 100644 --- a/src/gui/components/cc_item_shapes.h +++ b/src/gui/components/cc_item_shapes.h @@ -47,7 +47,9 @@ 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 +66,9 @@ 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..c29e3a9ae 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -86,7 +86,10 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox const int& font_style, CComponentsForm *parent, int shadow_mode, - fb_pixel_t color_text, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow); + fb_pixel_t color_text, + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow); ///destroy current CTextBox and CBox objects void clearCCText(); @@ -109,7 +112,10 @@ 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 +124,10 @@ 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(); @@ -133,7 +142,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem, public CBox ///set text color virtual void setTextColor(const fb_pixel_t& color_text); ///set all basic framebuffer element colors at once - ///Note: Possible color values are defined in "gui/color.h" and "gui/customcolor.h" + ///Note: Possible color values are defined in "gui/color.h" and "gui/color_custom.h" virtual void setColorAll(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, fb_pixel_t color_text = COL_MENUCONTENT_TEXT) { CCDraw::setColorAll(color_frame, color_body, color_shadow); @@ -254,7 +263,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/components/cc_item_tvpic.cpp b/src/gui/components/cc_item_tvpic.cpp index 4d038d897..e3cd41da8 100644 --- a/src/gui/components/cc_item_tvpic.cpp +++ b/src/gui/components/cc_item_tvpic.cpp @@ -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; diff --git a/src/gui/components/cc_item_tvpic.h b/src/gui/components/cc_item_tvpic.h index 4f1e22e8b..373a88490 100644 --- a/src/gui/components/cc_item_tvpic.h +++ b/src/gui/components/cc_item_tvpic.h @@ -54,7 +54,7 @@ class CComponentsPIP : public CComponentsItem CComponentsPIP( const int x_pos = 0, const int y_pos = 0, const int percent = 30, CComponentsForm *parent = NULL, int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_BLACK, fb_pixel_t color_body = COL_BACKGROUND_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + fb_pixel_t color_frame = COL_SHADOW_PLUS_0, fb_pixel_t color_body = COL_BACKGROUND_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); ~CComponentsPIP(); ///set property: width of tv box in pixel diff --git a/src/gui/customcolor.h b/src/gui/customcolor.h deleted file mode 100644 index 8d5be708a..000000000 --- a/src/gui/customcolor.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __custom_color__ -#define __custom_color__ - -#define COLOR_CUSTOM 0x0 -#ifdef FB_USE_PALETTE -/* -#define COL_WHITE (COLOR_CUSTOM + 0) -#define COL_RED (COLOR_CUSTOM + 1) -#define COL_GREEN (COLOR_CUSTOM + 2) -#define COL_BLUE (COLOR_CUSTOM + 3) -#define COL_YELLOW (COLOR_CUSTOM + 4) -#define COL_BLACK (COLOR_CUSTOM + 5) -*/ -#define COL_DARK_RED 0x02 -#define COL_DARK_GREEN 0x03 -#define COL_OLIVE 0x04 -#define COL_DARK_BLUE 0x05 -#define COL_LIGHT_GRAY 0x08 -#define COL_DARK_GRAY 0x09 -#define COL_RED 0x0A -#define COL_GREEN 0x0B -#define COL_YELLOW 0x0C -#define COL_BLUE 0x0D -#define COL_PURP 0x0E -#define COL_LIGHT_BLUE 0x0F -#define COL_WHITE 0x10 -#define COL_BLACK 0x11 -#else -#define COL_DARK_RED0 0x02 -#define COL_DARK_GREEN0 0x03 -#define COL_OLIVE0 0x04 -#define COL_DARK_BLUE0 0x05 -#define COL_LIGHT_GRAY0 0x08 -#define COL_DARK_GRAY0 0x09 -#define COL_RED0 0x0A -#define COL_GREEN0 0x0B -#define COL_YELLOW0 0x0C -#define COL_BLUE0 0x0D -#define COL_PURP0 0x0E -#define COL_LIGHT_BLUE0 0x0F -#define COL_WHITE0 0x10 -#define COL_BLACK0 0x11 - -#define COL_DARK_RED (CFrameBuffer::getInstance()->realcolor[0x02]) -#define COL_DARK_GREEN (CFrameBuffer::getInstance()->realcolor[0x03]) -#define COL_OLIVE (CFrameBuffer::getInstance()->realcolor[0x04]) -#define COL_DARK_BLUE (CFrameBuffer::getInstance()->realcolor[0x05]) -#define COL_LIGHT_GRAY (CFrameBuffer::getInstance()->realcolor[0x08]) -#define COL_DARK_GRAY (CFrameBuffer::getInstance()->realcolor[0x09]) -#define COL_RED (CFrameBuffer::getInstance()->realcolor[0x0A]) -#define COL_GREEN (CFrameBuffer::getInstance()->realcolor[0x0B]) -#define COL_YELLOW (CFrameBuffer::getInstance()->realcolor[0x0C]) -#define COL_BLUE (CFrameBuffer::getInstance()->realcolor[0x0D]) -#define COL_PURP (CFrameBuffer::getInstance()->realcolor[0x0E]) -#define COL_LIGHT_BLUE (CFrameBuffer::getInstance()->realcolor[0x0F]) -#define COL_WHITE (CFrameBuffer::getInstance()->realcolor[0x10]) -#define COL_BLACK (CFrameBuffer::getInstance()->realcolor[0x11]) -#endif - -#endif diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 3c6fa0828..4cd2ef8a3 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -1243,7 +1243,7 @@ void EpgPlus::paint() int sliderKnobPosition = this->selectedChannelEntry == NULL ? 0 : (this->selectedChannelEntry->index / this->maxNumberOfDisplayableEntries); this->frameBuffer->paintBoxRel (this->sliderX + 2, this->sliderY + (int(sliderKnobPosition * sliderKnobHeight)) - , this->sliderWidth - 4, int (sliderKnobHeight) , COL_MENUCONTENT_PLUS_3); + , this->sliderWidth - 4, int (sliderKnobHeight) , COL_SCROLLBAR_ACTIVE_PLUS_0); } // -- EPG+ Menue Handler Class diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 4a65e8944..af6a16611 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -367,8 +366,8 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear) int sbs= (startPos+ 1)/ medlinecount; if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_MENUCONTENT_PLUS_1); // scrollbar bg - frameBuffer->paintBoxRel(sx+ ox- 13, ypos+ 2+ sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); // scrollbar + frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); // scrollbar bg + frameBuffer->paintBoxRel(sx+ ox- 13, ypos+ 2+ sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); // scrollbar } #define GENRE_MOVIE_COUNT 9 diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 5a977953a..3db3638d9 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -942,14 +942,14 @@ void CEventList::paint(t_channel_id channel_id) int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((evtlist.size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); } diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 3c242be6d..470b5f87d 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1455,14 +1455,14 @@ void CFileBrowser::paint() //scrollbar int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((filelist.size()- 1)/ listmaxshow)+ 1; int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL); } void CFileBrowser::SMSInput(const neutrino_msg_t msg) diff --git a/src/gui/imageinfo_ni.cpp b/src/gui/imageinfo_ni.cpp index 27fd0e65e..09e5bbd33 100644 --- a/src/gui/imageinfo_ni.cpp +++ b/src/gui/imageinfo_ni.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/gui/infoclock.cpp b/src/gui/infoclock.cpp index bd28a7f21..0971e2401 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -36,7 +36,7 @@ -CInfoClock::CInfoClock():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0) +CInfoClock::CInfoClock():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON) { initCCLockItems(); } @@ -54,13 +54,13 @@ 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_SHADOW_PLUS_0); //set text color if (paint_bg){ cl_col_text = COL_MENUCONTENT_TEXT; setColorBody(COL_MENUCONTENT_PLUS_0); - enableShadow(CC_SHADOW_ON, 3); + enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2); }else{ cl_col_text = COL_INFOCLOCK_TEXT; setColorBody(COL_BACKGROUND_PLUS_0); diff --git a/src/gui/infoicons.cpp b/src/gui/infoicons.cpp index b380cb97f..046cc8e3b 100644 --- a/src/gui/infoicons.cpp +++ b/src/gui/infoicons.cpp @@ -148,7 +148,7 @@ void CInfoIcons::paintBackground() { if (g_settings.mode_icons_background) { - frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, height, COL_SHADOW_PLUS_0, RADIUS_SMALL); + frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_SMALL); frameBuffer->paintBoxRel(x, y, width, height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL); } else @@ -250,7 +250,7 @@ void CInfoIcons::paintIcons(bool first) void CInfoIcons::hideIcons() { - frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET); + frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW); } void* CInfoIcons::TimerProc(void *arg) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index ec2b9de1b..689ad233a 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -56,9 +56,9 @@ #include #include +#include #include #include -#include #include #include #include @@ -230,7 +230,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(); @@ -316,12 +316,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; @@ -367,7 +367,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(0); //NI - rec->setShadowWidth(SHADOW_OFFSET/2); + rec->setShadowWidth(OFFSET_SHADOW/2); rec->setCorner(RADIUS_MIN, CORNER_ALL); } if (rec->getWidth() != box_w) @@ -416,17 +416,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 @@ -436,10 +436,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); @@ -468,7 +468,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; @@ -608,7 +608,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); @@ -791,7 +791,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); @@ -1395,8 +1395,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++) { @@ -1420,7 +1420,7 @@ void CInfoViewer::showRadiotext() InfoIcons->hideIcons(); // 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); } @@ -1449,7 +1449,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 @@ -1741,6 +1741,8 @@ void CInfoViewer::showSNR () int sigbox_offset = ChanWidth *10/100; sigbox = new CSignalBox(BoxStartX + sigbox_offset, y_numbox+ChanHeight/2, ChanWidth - 2*sigbox_offset, ChanHeight/2, NULL, true, NULL, "S", "Q"); sigbox->setTextColor(COL_INFOBAR_TEXT); + sigbox->setActiveColor(COL_INFOBAR_PLUS_7); + sigbox->setPassiveColor(COL_INFOBAR_PLUS_3); sigbox->setColorBody(numbox->getColorBody()); sigbox->doPaintBg(false); sigbox->enableTboxSaveScreen(numbox->getColBodyGradientMode()); @@ -1800,17 +1802,14 @@ void CInfoViewer::display_Info(const char *current, const char *next, int pb_w = 112; int pb_startx = BoxEndX - pb_w; //NI int pb_starty = ChanNameY - (pb_h + 10); - int pb_shadow = COL_SHADOW_PLUS_0; - timescale->enableShadow(!g_settings.infobar_progressbar); - int pb_color = (g_settings.progressbar_design == CProgressBar::PB_MONO) ? COL_INFOBAR_PLUS_0 : COL_SHADOW_PLUS_0; - if(g_settings.infobar_progressbar){ + if (g_settings.infobar_progressbar) + { pb_startx = xStart; pb_w = BoxEndX - 10 - xStart; pb_w -= analogclock_size + analogclock_offset; //NI - pb_shadow = 0; } 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); @@ -1833,10 +1832,12 @@ void CInfoViewer::display_Info(const char *current, const char *next, pb_p = pb_w; timescale->setDimensionsAll(pb_startx, pb_starty, pb_w, pb_h); - timescale->setColorAll(pb_color, pb_color, pb_shadow); + timescale->setActiveColor(COL_INFOBAR_PLUS_7); + timescale->setPassiveColor(g_settings.infobar_progressbar ? COL_INFOBAR_PLUS_1 : COL_INFOBAR_PLUS_0); + 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(); @@ -2183,7 +2184,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); @@ -2220,7 +2221,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 @@ -2230,8 +2231,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(); @@ -2548,7 +2549,7 @@ void CInfoViewer::ecmInfoBox_show(const char * txt, int w, int h, Font * font) //calc available width (width of Infobar) int max_w = BoxEndX - BoxStartX; //calc available height (space between Top and Infobar) - int max_h = BoxStartY - frameBuffer->getScreenY() - 2*SHADOW_OFFSET; + int max_h = BoxStartY - frameBuffer->getScreenY() - 2*OFFSET_SHADOW; //get window header object CComponentsHeader* winheader = ecmInfoBox->getHeaderObject(); diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index e1fd9a59a..08e3b5b44 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -48,7 +48,6 @@ #include "gui/keybind_setup.h" #include #include -#include #include #include #include diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 57f01d0ce..9c36a6594 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 65 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..e7e0b80bc 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -171,6 +172,11 @@ 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) }, + { "SCROLLBAR_ACTIVE", MAGIC_COLOR | (COL_SCROLLBAR_ACTIVE) }, + { "SCROLLBAR_PASSIVE", MAGIC_COLOR | (COL_SCROLLBAR_PASSIVE) }, + { "PROGRESSBAR_ACTIVE", MAGIC_COLOR | (COL_PROGRESSBAR_ACTIVE) }, + { "PROGRESSBAR_PASSIVE", MAGIC_COLOR | (COL_PROGRESSBAR_PASSIVE) }, { "BACKGROUND", MAGIC_COLOR | (COL_BACKGROUND) }, { "DARK_RED", MAGIC_COLOR | (COL_DARK_RED0) }, { "DARK_GREEN", MAGIC_COLOR | (COL_DARK_GREEN0) }, @@ -217,6 +223,11 @@ 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) }, + { "SCROLLBAR_ACTIVE_PLUS_0", (lua_Unsigned) (COL_SCROLLBAR_ACTIVE_PLUS_0) }, + { "SCROLLBAR_PASSIVE_PLUS_0", (lua_Unsigned) (COL_SCROLLBAR_PASSIVE_PLUS_0) }, + { "PROGRESSBAR_ACTIVE_PLUS_0", (lua_Unsigned) (COL_PROGRESSBAR_ACTIVE_PLUS_0) }, + { "PROGRESSBAR_PASSIVE_PLUS_0", (lua_Unsigned) (COL_PROGRESSBAR_PASSIVE_PLUS_0) }, { NULL, 0 } }; diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index d10cdfbb5..50a5ed1f8 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -33,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index ade95cb84..c08625421 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -47,11 +47,11 @@ //#include #include "mb.h" #include "mb_functions.h" +#include "mb_help.h" #include #include #include #include -#include #include #include #include @@ -67,7 +67,6 @@ #include //#include #include -#include #include #include //#include @@ -155,8 +154,6 @@ const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_ #define TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] #define FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT] -#define INTER_FRAME_SPACE 4 // space between e.g. upper and lower window - const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] = { LOCALE_MOVIEBROWSER_SHORT_FILENAME, @@ -520,18 +517,18 @@ void CMovieBrowser::initFrames(void) m_cBoxFrameLastPlayList.iX = m_cBoxFrameBrowserList.iX; m_cBoxFrameLastPlayList.iY = m_cBoxFrameBrowserList.iY ; - m_cBoxFrameLastPlayList.iWidth = (m_cBoxFrameBrowserList.iWidth>>1) - (INTER_FRAME_SPACE>>1); + m_cBoxFrameLastPlayList.iWidth = (m_cBoxFrameBrowserList.iWidth>>1) - (OFFSET_INTER>>1); m_cBoxFrameLastPlayList.iHeight = m_cBoxFrameBrowserList.iHeight; - m_cBoxFrameLastRecordList.iX = m_cBoxFrameLastPlayList.iX + m_cBoxFrameLastPlayList.iWidth + INTER_FRAME_SPACE; + m_cBoxFrameLastRecordList.iX = m_cBoxFrameLastPlayList.iX + m_cBoxFrameLastPlayList.iWidth + OFFSET_INTER; m_cBoxFrameLastRecordList.iY = m_cBoxFrameLastPlayList.iY; - m_cBoxFrameLastRecordList.iWidth = m_cBoxFrame.iWidth - m_cBoxFrameLastPlayList.iWidth - INTER_FRAME_SPACE; + m_cBoxFrameLastRecordList.iWidth = m_cBoxFrame.iWidth - m_cBoxFrameLastPlayList.iWidth - OFFSET_INTER; m_cBoxFrameLastRecordList.iHeight = m_cBoxFrameLastPlayList.iHeight; m_cBoxFrameInfo.iX = m_cBoxFrameBrowserList.iX; - m_cBoxFrameInfo.iY = m_cBoxFrameBrowserList.iY + m_cBoxFrameBrowserList.iHeight + INTER_FRAME_SPACE; + m_cBoxFrameInfo.iY = m_cBoxFrameBrowserList.iY + m_cBoxFrameBrowserList.iHeight + OFFSET_INTER; m_cBoxFrameInfo.iWidth = m_cBoxFrameBrowserList.iWidth; - m_cBoxFrameInfo.iHeight = m_cBoxFrame.iHeight - m_cBoxFrameBrowserList.iHeight - INTER_FRAME_SPACE - m_cBoxFrameFootRel.iHeight - m_cBoxFrameTitleRel.iHeight; + m_cBoxFrameInfo.iHeight = m_cBoxFrame.iHeight - m_cBoxFrameBrowserList.iHeight - OFFSET_INTER - m_cBoxFrameFootRel.iHeight - m_cBoxFrameTitleRel.iHeight; m_cBoxFrameFilter.iX = m_cBoxFrameInfo.iX; m_cBoxFrameFilter.iY = m_cBoxFrameInfo.iY; @@ -4084,24 +4081,7 @@ int CMenuSelector::paint(bool selected) return y+height; } -int CMovieHelp::exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) -{ - Helpbox helpbox; - helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY)); - helpbox.addLine(""); - helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE)); - helpbox.addLine(""); - helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_LEFT)); - helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RIGHT)); - helpbox.show(LOCALE_MESSAGEBOX_INFO); - return(0); -} + ///////////////////////////////////////////////// // MenuTargets //////////////////////////////////////////////// diff --git a/src/gui/moviebrowser/mb.h b/src/gui/moviebrowser/mb.h index c85201f3d..844f5910f 100644 --- a/src/gui/moviebrowser/mb.h +++ b/src/gui/moviebrowser/mb.h @@ -357,16 +357,6 @@ class CMovieBrowser : public CMenuTarget bool addFile(CFile &file, int dirItNr); }; -// Class to show Moviebrowser Information, to be used by menu -class CMovieHelp : public CMenuTarget -{ - private: - - public: - CMovieHelp(){}; - ~CMovieHelp(){}; - int exec( CMenuTarget* parent, const std::string & actionKey ); -}; // I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage. //Might be replaced by somebody who is familiar with this stuff . diff --git a/src/gui/moviebrowser/mb_help.h b/src/gui/moviebrowser/mb_help.h new file mode 100644 index 000000000..dc77e86d1 --- /dev/null +++ b/src/gui/moviebrowser/mb_help.h @@ -0,0 +1,72 @@ +/* + Based up Neutrino-GUI - Tuxbox-Project + Copyright (C) 2001 by Steffen Hehn 'McClean' + + License: GPL + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + *********************************************************** + + Module Name: mb_help.h + + Description: Implementation of the CMovieBrowser class + This class provides a filebrowser window to view, select and start a movies from HD. + This class does replace the Filebrowser + + Date: Nov 2005 + + Author: Guenther@tuxbox.berlios.org + based on code of Steffen Hehn 'McClean' + + outsourced: + (C) 2016, Thilo Graf 'dbt' +*/ + +#ifndef MOVIEBROWSER_HELP_H_ +#define MOVIEBROWSER_HELP_H_ + + +#include + +// Class to show Moviebrowser Information, to be used by menu +class CMovieHelp : public CMenuTarget +{ + private: + + public: + CMovieHelp(){}; + ~CMovieHelp(){}; + + int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) + { + Helpbox helpbox; + helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY)); + helpbox.addLine(""); + helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE)); + helpbox.addLine(""); + helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_LEFT)); + helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RIGHT)); + helpbox.show(LOCALE_MESSAGEBOX_INFO); + return(0); + } +}; + +#endif /*MOVIEBROWSER_HELP_H_*/ diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 357dda379..07fe819fb 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -46,6 +46,7 @@ #include "osd_progressbar_setup.h" #include +#include #include #include //NI #include //NI diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index eecea03cd..14c9cb056 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -773,7 +773,7 @@ void CPictureViewerGui::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) @@ -783,7 +783,7 @@ void CPictureViewerGui::paint() if (sbc < 1) sbc = 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0); paintFoot(); paintInfo(); diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 4fddbaa3f..f3b48ea68 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -53,8 +53,6 @@ #include #include -#include - #include #include #include diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index d3d1f31d6..0814aacb3 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -40,6 +40,7 @@ #include "audiomute.h" #include "screensaver.h" #include +#include #include #include diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 654602593..b1db3a7e0 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -39,8 +39,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 2ff3dde74..39cd78338 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -40,7 +40,7 @@ extern CInfoIcons *InfoIcons; -CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0) +CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON) { Init(); } @@ -52,7 +52,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_SHADOW_PLUS_0); //set text color if (paint_bg){ @@ -104,7 +104,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_SHADOW_PLUS_0); //use current theme colors paint_bg = true; if (g_settings.infoClockBackground) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index d954370fb..93042de3d 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -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_MENUCONTENTDARK_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); @@ -856,7 +856,7 @@ void CTimerList::paintFoot() } //shadow - frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + height - footerHeight, width, footerHeight + SHADOW_OFFSET, COL_MENUCONTENTDARK_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); @@ -882,13 +882,13 @@ void CTimerList::paint() { int ypos = y+ theight; int sb = 2*fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = listmaxshow; if(!tmp_max) tmp_max = 1; int sbc= ((timerlist.size()- 1)/ tmp_max)+ 1; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL); } paintFoot(); diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index cf4c679b4..0464ed971 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -85,15 +85,13 @@ CUpnpBrowserGui::CUpnpBrowserGui() CFrameBuffer::getInstance()->OnAfterSetPallette.connect(reinit); } -#define INNER_OFFSET SHADOW_OFFSET - void CUpnpBrowserGui::Init() { font_item = SNeutrinoSettings::FONT_TYPE_MENU; topbox.enableFrame(true, 1); //NI topbox.setCorner(RADIUS_LARGE); - topbox.setColorAll(COL_MENUCONTENT_PLUS_1, 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); @@ -129,19 +127,19 @@ void CUpnpBrowserGui::Init() /* From top to bottom we have: * * topbox (with shadow) - * INNER_OFFSET + * OFFSET_INTER * mainwindow (with shadow) * - header * - body (items*listshowmax) * - footer - * INNER_OFFSET + * OFFSET_INTER * 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 - OFFSET_INTER - m_header_height - m_footer_height - OFFSET_SHADOW - OFFSET_INTER - 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 + OFFSET_INTER + m_header_height + (m_listmaxshow * m_item_height) + m_footer_height + OFFSET_SHADOW + OFFSET_INTER + m_infobox_height + OFFSET_SHADOW; footer.setHeight(m_footer_height); footer.enableShadow(CC_SHADOW_ON, -1, true); @@ -152,10 +150,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 + OFFSET_INTER; 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 + OFFSET_INTER; } CUpnpBrowserGui::~CUpnpBrowserGui() @@ -1000,17 +998,17 @@ void CUpnpBrowserGui::paintDevices() paintDevice(count); int sb = m_item_height * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_MENUCONTENT_PLUS_1); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp_max = m_listmaxshow; if(!tmp_max) tmp_max = 1; int sbc = ((m_devices.size() - 1) / tmp_max) + 1; int sbs = ((m_selecteddevice) / tmp_max); - m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); + 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); @@ -1130,7 +1128,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) if(lastname != entry->albumArtURI){ tmpname = lastname = entry->albumArtURI.c_str(); tmpname = g_PicViewer->DownloadImage(tmpname); - int h_image = infobox.getHeight() - INNER_OFFSET - infobox.getCornerRadius(); + int h_image = infobox.getHeight() - OFFSET_INTER - infobox.getCornerRadius(); int y_image = infobox.getYPos() + infobox.getHeight()/2 - h_image/2; if (!image){ image = new CComponentsPicture(100, y_image, tmpname, NULL, CC_SHADOW_OFF, COL_MENUCONTENTDARK_PLUS_0); @@ -1139,7 +1137,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) } image->setPicture(tmpname); image->setHeight(h_image, true); - int x_image = infobox.getXPos() + infobox.getWidth() - image->getWidth() - INNER_OFFSET - infobox.getCornerRadius(); + int x_image = infobox.getXPos() + infobox.getWidth() - image->getWidth() - OFFSET_INTER - infobox.getCornerRadius(); image->setXPos(x_image); } }else{ @@ -1177,7 +1175,7 @@ void CUpnpBrowserGui::paintItems(std::vector *entry, unsigned int sel paintItem(entry, count, selected); int sb = m_item_height * m_listmaxshow; - m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_MENUCONTENT_PLUS_1); + m_frameBuffer->paintBoxRel(m_x + m_width - 15, m_item_y, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int tmp = m_listmaxshow ? m_listmaxshow : 1;//avoid division by zero int sbc = ((max + offset - 1) / tmp) + 1; int sbs = ((selected + offset) / tmp); @@ -1185,10 +1183,10 @@ void CUpnpBrowserGui::paintItems(std::vector *entry, unsigned int sel int sbh = 0; if ((sbc > 0) && (sbc > sb-4)) sbh = 2; - m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*((sb-4)/sbc+sbh), 11, (sb-4)/sbc + sbh, COL_MENUCONTENT_PLUS_3); + 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]); @@ -1200,7 +1198,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 - OFFSET_INTER - 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); diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 8e22faff8..1586946c1 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -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; diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index a427be80a..a5536f234 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -28,7 +28,6 @@ #include #include -#include #include // #include diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 355efb877..febb0f5fa 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -210,9 +210,9 @@ void CHintBox::refresh(void) if (entries_per_page < line.size()) { ypos = theight + (fheight >> 1); - window->paintBoxRel(width - 15, ypos , 15, entries_per_page * fheight, COL_MENUCONTENT_PLUS_1); + window->paintBoxRel(width - 15, ypos, 15, entries_per_page * fheight, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = (entries_per_page * fheight) / ((line.size() + entries_per_page - 1) / entries_per_page); - window->paintBoxRel(width - 13, ypos + current_page * marker_size, 11, marker_size , COL_MENUCONTENT_PLUS_3); + window->paintBoxRel(width - 13, ypos + current_page * marker_size, 11, marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); } } diff --git a/src/gui/widget/hintboxext.cpp b/src/gui/widget/hintboxext.cpp index dfc89946d..ea89a0f1b 100644 --- a/src/gui/widget/hintboxext.cpp +++ b/src/gui/widget/hintboxext.cpp @@ -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; } @@ -339,9 +339,9 @@ void CHintBoxExt::refresh(bool toround) { // yPos = m_theight + (m_fheight >> 1); yPos = m_theight; - m_window->paintBoxRel(m_width - 15, yPos, 15, m_maxEntriesPerPage * m_fheight, COL_MENUCONTENT_PLUS_1); + m_window->paintBoxRel(m_width - 15, yPos, 15, m_maxEntriesPerPage * m_fheight, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = (m_maxEntriesPerPage * m_fheight) / m_pages; - m_window->paintBoxRel(m_width - 13, yPos + m_currentPage * marker_size, 11, marker_size, COL_MENUCONTENT_PLUS_3); + m_window->paintBoxRel(m_width - 13, yPos + m_currentPage * marker_size, 11, marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); } } diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp index 377be76ae..02b1706c2 100644 --- a/src/gui/widget/keyboard_input.cpp +++ b/src/gui/widget/keyboard_input.cpp @@ -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_MENUCONTENTDARK_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); @@ -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_1, radius); //NI + 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/listbox.cpp b/src/gui/widget/listbox.cpp index 2dc01062f..acb4935da 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -68,7 +68,7 @@ void CListBox::paint() int ypos = y+ theight; int sb = fheight* listmaxshow; - frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); + frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PASSIVE_PLUS_0); int sbc= ((getItemCount()- 1)/ listmaxshow)+ 1; if (sbc < 1) @@ -77,7 +77,7 @@ void CListBox::paint() int sbh= (sb- 4)/ sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs* sbh , 11, sbh, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs* sbh , 11, sbh, COL_SCROLLBAR_ACTIVE_PLUS_0); } void CListBox::paintHead() diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index bc0659004..2e2d168bf 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -377,12 +377,12 @@ void CListFrame::refreshScroll(void) if (m_nNrOfPages > 1) { frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, - m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_MENUCONTENT_PLUS_1); + m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = m_cFrameScrollRel.iHeight / m_nNrOfPages; frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, m_cFrameScrollRel.iY + m_nCurrentPage * marker_size +m_cFrame.iY, m_cFrameScrollRel.iWidth - (2*SCROLL_MARKER_BORDER), - marker_size, COL_MENUCONTENT_PLUS_3); + marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); } else { diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index c96012ebc..61c239d66 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -265,7 +265,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_1; //NI + right_frame_col = COL_FRAME_PLUS_0; } else { right_bg_col = COL_MENUCONTENTINACTIVE_TEXT; @@ -1208,8 +1208,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+OFFSET_INTER*/; /* + ConnectLineBox_Width for the hintbox connection line * + center_offset for symmetry * + 20 for setMenuPos calculates 10 pixels border left and right */ @@ -1217,7 +1217,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 */ } @@ -1259,14 +1259,14 @@ 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); 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)); @@ -1336,8 +1336,8 @@ void CMenuWidget::paintItems() if(total_pages>1) { int item_height=height-(item_start_y-y); - frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_MENUCONTENT_PLUS_1, RADIUS_MIN); - frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_MENUCONTENT_PLUS_3, RADIUS_MIN); + frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_SCROLLBAR_PASSIVE_PLUS_0, RADIUS_MIN); + frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_MIN); /* background of menu items, paint every time because different items can have * different height and this might leave artifacts otherwise after changing pages */ frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0); @@ -1466,7 +1466,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 + OFFSET_INTER; int iwidth = width+sb_width; //init details line and infobox dimensions @@ -1497,7 +1497,7 @@ void CMenuWidget::paintHint(int pos) //NI 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_1, COL_MENUCONTENT_PLUS_0); //NI + 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 diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index 791bde242..bf6d22730 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -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); diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 6e0067e4f..f6ca7e428 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -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); diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index 8e992cf1c..c7decf8fa 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -67,9 +67,9 @@ void CProgressWindow::Init() local_bar->allowPaint(false); local_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar); local_bar->setColorBody(col_body); - local_bar->setActiveColor(COL_MENUCONTENT_PLUS_7); + local_bar->setActiveColor(COL_PROGRESSBAR_ACTIVE_PLUS_0); local_bar->setFrameThickness(w_bar_frame); - local_bar->setColorFrame(COL_MENUCONTENT_PLUS_7); + local_bar->setColorFrame(COL_PROGRESSBAR_ACTIVE_PLUS_0); addWindowItem(local_bar); y_item += 2*h_pbar; @@ -78,9 +78,9 @@ void CProgressWindow::Init() global_bar->allowPaint(false); global_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar); global_bar->setColorBody(col_body); - global_bar->setActiveColor(COL_MENUCONTENT_PLUS_7); + global_bar->setActiveColor(COL_PROGRESSBAR_ACTIVE_PLUS_0); global_bar->setFrameThickness(w_bar_frame); - global_bar->setColorFrame(COL_MENUCONTENT_PLUS_7); + global_bar->setColorFrame(COL_PROGRESSBAR_ACTIVE_PLUS_0); addWindowItem(global_bar); y_item += 2*h_pbar; diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index aba428bd2..79b10c6c9 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -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_MENUCONTENTDARK_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 & ) { diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 1be42973e..362ab79e7 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -494,12 +494,12 @@ void CTextBox::refreshScroll(void) { frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, - COL_MENUCONTENT_PLUS_1); + COL_SCROLLBAR_PASSIVE_PLUS_0); unsigned int marker_size = m_cFrameScrollRel.iHeight / m_nNrOfPages; frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, m_cFrameScrollRel.iY + m_nCurrentPage * marker_size+m_cFrame.iY, m_cFrameScrollRel.iWidth - 2*SCROLL_MARKER_BORDER, - marker_size, COL_MENUCONTENT_PLUS_3); + marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0); m_has_scrolled = true; } else diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index e895ece0e..cb5f26a24 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -61,7 +61,6 @@ #include #include -#include #include #define TRACE printf #define TRACE_1 printf diff --git a/src/nhttpd/tuxboxapi/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/neutrinoapi.cpp index baceef32d..bfd6b216c 100644 --- a/src/nhttpd/tuxboxapi/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoapi.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/system/settings.h b/src/system/settings.h index 71d0566ad..19c9352b0 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -931,18 +931,25 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO #define DEFAULT_LCD_AUTODIMM 0x00 #define DEFAULT_LCD_SHOW_VOLUME 0x01 -#define CORNER_RADIUS_LARGE 11 -#define CORNER_RADIUS_MID 7 -#define CORNER_RADIUS_SMALL 5 -#define CORNER_RADIUS_MIN 3 +#define CORNER_RADIUS_LARGE 11 +#define CORNER_RADIUS_MID 7 +#define CORNER_RADIUS_SMALL 5 +#define CORNER_RADIUS_MIN 3 +#define CORNER_RADIUS_NONE 0 -#define RADIUS_LARGE (g_settings.rounded_corners ? CORNER_RADIUS_LARGE : 0) -#define RADIUS_MID (g_settings.rounded_corners ? CORNER_RADIUS_MID : 0) -#define RADIUS_SMALL (g_settings.rounded_corners ? CORNER_RADIUS_SMALL : 0) -#define RADIUS_MIN (g_settings.rounded_corners ? CORNER_RADIUS_MIN : 0) +#define RADIUS_LARGE (g_settings.rounded_corners ? CORNER_RADIUS_LARGE : 0) +#define RADIUS_MID (g_settings.rounded_corners ? CORNER_RADIUS_MID : 0) +#define RADIUS_SMALL (g_settings.rounded_corners ? CORNER_RADIUS_SMALL : 0) +#define RADIUS_MIN (g_settings.rounded_corners ? CORNER_RADIUS_MIN : 0) +#define RADIUS_NONE 0 + +// offsets +#define OFFSET_SHADOW 6 +#define OFFSET_INTER 6 +//#define OFFSET_INNER_LARGE 20 +//#define OFFSET_INNER_MID 10 +//#define OFFSET_INNER_SMALL 5 -// shadow -#define SHADOW_OFFSET 6 struct SglobalInfo {