From c60c5c5ce39c2555c233f699adddf61a5e5b2511 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 11 Jul 2013 09:41:27 +0200 Subject: [PATCH] Replace color indexes of the text colors by real color values for RenderString() - If necessary, Correct data types of the color values --- src/gui/audioplayer.cpp | 34 +++---- src/gui/bedit/bouqueteditor_bouquets.cpp | 6 +- src/gui/bedit/bouqueteditor_channels.cpp | 6 +- src/gui/bedit/bouqueteditor_chanselect.cpp | 10 +- src/gui/bookmarkmanager.cpp | 12 +-- src/gui/bouquetlist.cpp | 6 +- src/gui/channellist.cpp | 40 ++++---- src/gui/components/cc_frm_button.cpp | 4 +- src/gui/components/cc_frm_clock.cpp | 2 +- src/gui/components/cc_frm_header.cpp | 2 +- src/gui/components/cc_item_infobox.h | 2 +- src/gui/components/cc_item_text.cpp | 2 +- src/gui/components/cc_item_text.h | 6 +- .../components/unmaintained/cc_item_box.cpp | 4 +- src/gui/components/unmaintained/cc_misc.h | 6 +- src/gui/dboxinfo.cpp | 10 +- src/gui/epgplus.cpp | 26 +++--- src/gui/epgview.cpp | 24 ++--- src/gui/eventlist.cpp | 18 ++-- src/gui/filebrowser.cpp | 20 ++-- src/gui/infoclock.cpp | 2 +- src/gui/infoviewer.cpp | 92 +++++++++---------- src/gui/infoviewer_bb.cpp | 3 +- src/gui/motorcontrol.cpp | 10 +- src/gui/moviebrowser.cpp | 10 +- src/gui/movieplayer.cpp | 2 +- src/gui/pictureviewer.cpp | 12 +-- src/gui/pipsetup.cpp | 8 +- src/gui/pluginlist.cpp | 4 +- src/gui/scan.cpp | 12 +-- src/gui/screensetup.cpp | 6 +- src/gui/streaminfo2.cpp | 88 +++++++++--------- src/gui/timeosd.cpp | 4 +- src/gui/timerlist.cpp | 8 +- src/gui/upnpbrowser.cpp | 46 +++++----- src/gui/volumebar.cpp | 2 +- src/gui/widget/buttons.cpp | 4 +- src/gui/widget/buttons.h | 2 +- src/gui/widget/colorchooser.cpp | 4 +- src/gui/widget/drawable.cpp | 4 +- src/gui/widget/hintbox.cpp | 8 +- src/gui/widget/hintboxext.cpp | 2 +- src/gui/widget/keychooser.cpp | 6 +- src/gui/widget/listbox.cpp | 16 ++-- src/gui/widget/listframe.cpp | 14 +-- src/gui/widget/menue.cpp | 12 +-- src/gui/widget/messagebox.cpp | 4 +- src/gui/widget/msgbox.cpp | 18 ++-- src/gui/widget/progresswindow.cpp | 6 +- src/gui/widget/stringinput.cpp | 14 +-- src/gui/widget/stringinput_ext.cpp | 12 +-- src/gui/widget/textbox.cpp | 2 +- 52 files changed, 341 insertions(+), 336 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index c30f02c40..c40a822ea 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -830,7 +830,7 @@ int CAudioPlayerGui::show() m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6, RADIUS_SMALL); m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0, RADIUS_SMALL); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP] - ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED,0); + ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED_TEXT,0); g_RCInput->getMsg_ms(&msg, &data, AUDIOPLAYERGUI_SMSKEY_TIMEOUT - 200); @@ -1547,19 +1547,19 @@ void CAudioPlayerGui::paintItem(int pos) int ypos = m_y + m_title_height + m_theight + pos*m_fheight; int c_rad_small; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if ((pos + m_liststart) == m_selected) { if ((pos + m_liststart) == (unsigned)m_current) { - color = COL_MENUCONTENTSELECTED + 2; + color = COL_MENUCONTENTSELECTED_TEXT_PLUS_2; bgcolor = COL_MENUCONTENTSELECTED_PLUS_2; } else { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } paintItemID3DetailsLine(pos); @@ -1571,12 +1571,12 @@ void CAudioPlayerGui::paintItem(int pos) { if ((pos + m_liststart) == (unsigned)m_current) { - color = COL_MENUCONTENTDARK + 2; + color = COL_MENUCONTENTDARK_TEXT_PLUS_2; bgcolor = COL_MENUCONTENTDARK_PLUS_2; } else { - color = COL_MENUCONTENTDARK; + color = COL_MENUCONTENTDARK_TEXT; bgcolor = COL_MENUCONTENTDARK_PLUS_0; } } @@ -1584,12 +1584,12 @@ void CAudioPlayerGui::paintItem(int pos) { if ((pos + m_liststart) == (unsigned)m_current) { - color = COL_MENUCONTENT + 2; + color = COL_MENUCONTENT_TEXT_PLUS_2; bgcolor = COL_MENUCONTENT_PLUS_2; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } } @@ -1815,7 +1815,7 @@ void CAudioPlayerGui::paintInfo() if (xstart < 10) xstart = 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 1*m_fheight, m_width - 20, - tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // second line (Artist/Title...) if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO && @@ -1844,7 +1844,7 @@ void CAudioPlayerGui::paintInfo() xstart=(m_width-w)/2; if (xstart < 10) xstart=10; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x+xstart, m_y +4+ 2*m_fheight, m_width- 20, tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x+xstart, m_y +4+ 2*m_fheight, m_width- 20, tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // reset so fields get painted always m_metainfo.clear(); @@ -1928,7 +1928,7 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) ibox->paint(false); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + 10, ypos2 + 2 + 1*m_fheight, m_width- 80, - m_playlist[m_selected].MetaData.title, COL_MENUCONTENTDARK, 0, true); // UTF-8 + m_playlist[m_selected].MetaData.title, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 std::string tmp; if (m_playlist[m_selected].MetaData.genre.empty()) tmp = m_playlist[m_selected].MetaData.date; @@ -1942,7 +1942,7 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) } int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true) + 10; // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + m_width - w - 5, ypos2 + 2 + 1*m_fheight, - w, tmp, COL_MENUCONTENTDARK, 0, true); // UTF-8 + w, tmp, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 tmp = m_playlist[m_selected].MetaData.artist; if (!(m_playlist[m_selected].MetaData.album.empty())) { @@ -1951,7 +1951,7 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) tmp += ')'; } g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + 10, ypos2 + 2*m_fheight - 2, m_width - 20, - tmp, COL_MENUCONTENTDARK, 0, true); // UTF-8 + tmp, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 } else { @@ -2195,7 +2195,7 @@ void CAudioPlayerGui::updateMetaData(bool screen_saver) int xstart = ((m_width - 20 - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(m_metainfo))/2)+10; g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL] ->RenderString(m_x + xstart, m_y + 4 + 2*m_fheight + m_sheight, - m_width- 2*xstart, m_metainfo, COL_MENUCONTENTSELECTED); + m_width- 2*xstart, m_metainfo, COL_MENUCONTENTSELECTED_TEXT); } } //------------------------------------------------------------------------ @@ -2241,7 +2241,7 @@ void CAudioPlayerGui::updateTimes(const bool force) m_fheight, COL_MENUCONTENTSELECTED_PLUS_0); if (m_time_total > 0) g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + m_width - w1 - 10, m_y + 4 + m_fheight, - w1, tot_time, COL_MENUCONTENTSELECTED); + w1, tot_time, COL_MENUCONTENTSELECTED_TEXT); } if (updatePlayed || (m_state == CAudioPlayerGui::PAUSE)) { @@ -2253,7 +2253,7 @@ void CAudioPlayerGui::updateTimes(const bool force) if ((m_state != CAudioPlayerGui::PAUSE) || (tv.tv_sec & 1)) { g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + m_width - w1 - w2 - 11, m_y + 4 + m_fheight, - w2+4, play_time, COL_MENUCONTENTSELECTED); + w2+4, play_time, COL_MENUCONTENTSELECTED_TEXT); } } } @@ -2378,7 +2378,7 @@ bool CAudioPlayerGui::getNumericInput(neutrino_msg_t& msg, int& val) { int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6); m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 1, str, COL_MENUCONTENTSELECTED, 0); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 1, str, COL_MENUCONTENTSELECTED_TEXT, 0); while (true) { g_RCInput->getMsg(&msg, &data, 100); diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 4c4343d3b..ded93358f 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -74,13 +74,13 @@ CBEBouquetWidget::CBEBouquetWidget() void CBEBouquetWidget::paintItem(int pos) { - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; int ypos = y+ theight+0 + pos*iheight; unsigned int current = liststart + pos; if (current == selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, bgcolor, RADIUS_LARGE); @@ -88,7 +88,7 @@ void CBEBouquetWidget::paintItem(int pos) bool has_channels = true; if(current < Bouquets->size()) has_channels = (!(*Bouquets)[current]->tvChannels.empty() ) || (!(*Bouquets)[current]->radioChannels.empty()); - color = has_channels ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE; + color = has_channels ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT; bgcolor = has_channels ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, bgcolor); } diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index cc5000e39..63887b3d7 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -97,13 +97,13 @@ CBEChannelWidget::~CBEChannelWidget() void CBEChannelWidget::paintItem(int pos) { - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; int ypos = y+ theight+0 + pos*iheight; unsigned int current = liststart + pos; if(current == selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; if(current < Channels->size()) { @@ -114,7 +114,7 @@ void CBEChannelWidget::paintItem(int pos) frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, bgcolor, RADIUS_LARGE); } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, bgcolor); } diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 1810a9e45..56bf80e6d 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -105,11 +105,11 @@ void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool pselec { int ypos = y+ theight + paintNr*iheight; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if (pselected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; if(itemNr < getItemCount()) { @@ -122,7 +122,7 @@ void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool pselec } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; frameBuffer->paintBoxRel(x,ypos, width- 15, iheight, bgcolor); } @@ -199,10 +199,10 @@ void CBEChannelSelectWidget::paintFoot() #if 0 frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 3* ButtonWidth+ 8, y+height+1); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 3* ButtonWidth+ 38, y+height+24 - 2, width, g_Locale->getText(LOCALE_BOUQUETEDITOR_SWITCH), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 3* ButtonWidth+ 38, y+height+24 - 2, width, g_Locale->getText(LOCALE_BOUQUETEDITOR_SWITCH), COL_INFOBAR_TEXT, 0, true); // UTF-8 frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HOME, x+width - ButtonWidth+ 8, y+height+1); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width - ButtonWidth+ 38, y+height+24 - 2, width, g_Locale->getText(LOCALE_BOUQUETEDITOR_RETURN), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width - ButtonWidth+ 38, y+height+24 - 2, width, g_Locale->getText(LOCALE_BOUQUETEDITOR_RETURN), COL_INFOBAR_TEXT, 0, true); // UTF-8 #endif } diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 7bc6ec861..996d529b4 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -369,23 +369,23 @@ void CBookmarkManager::paintItem(int pos) { int ypos = y+ theight+0 + pos*fheight*2; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if (pos & 1) { - color = COL_MENUCONTENTDARK; + color = COL_MENUCONTENTDARK_TEXT; bgcolor = COL_MENUCONTENTDARK_PLUS_0; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } if (liststart + pos == selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } @@ -444,14 +444,14 @@ void CBookmarkManager::paintFoot() if (bookmarks.empty()) { frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 1* ButtonWidth + 10, y+height); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width-1 * ButtonWidth + 38, y+height+footerHeight - 2, ButtonWidth- 28, g_Locale->getText(LOCALE_BOOKMARKMANAGER_SELECT), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width-1 * ButtonWidth + 38, y+height+footerHeight - 2, ButtonWidth- 28, g_Locale->getText(LOCALE_BOOKMARKMANAGER_SELECT), COL_INFOBAR_TEXT, 0, true); // UTF-8 } else { ::paintButtons(x + 10, y + height + 4, width, 2, BookmarkmanagerButtons, footerHeight, ButtonWidth); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 1* ButtonWidth + 10, y+height); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width-1 * ButtonWidth + 38, y+height+footerHeight - 2, ButtonWidth- 28, g_Locale->getText(LOCALE_BOOKMARKMANAGER_SELECT), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width-1 * ButtonWidth + 38, y+height+footerHeight - 2, ButtonWidth- 28, g_Locale->getText(LOCALE_BOOKMARKMANAGER_SELECT), COL_INFOBAR_TEXT, 0, true); // UTF-8 } } diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 8c46a2982..cf193828c 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -538,7 +538,7 @@ void CBouquetList::hide() void CBouquetList::paintItem(int pos) { int ypos = y+ theight+0 + pos*fheight; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; bool iscurrent = true; int npos = liststart + pos; @@ -548,7 +548,7 @@ void CBouquetList::paintItem(int pos) lname = (Bouquets[npos]->zapitBouquet && Bouquets[npos]->zapitBouquet->bFav) ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : Bouquets[npos]->channelList->getName(); if (npos == (int) selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, RADIUS_LARGE); if(npos < (int) Bouquets.size()) @@ -556,7 +556,7 @@ void CBouquetList::paintItem(int pos) } else { if(npos < (int) Bouquets.size()) iscurrent = !Bouquets[npos]->channelList->isEmpty(); - color = iscurrent ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE; + color = iscurrent ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT; bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor); } diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index e973a49bb..17b2f5d17 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1366,7 +1366,7 @@ int CChannelList::numericZap(int key) for (int i = maxchansize-1; i >= 0; i--) { valstr[i+ 1] = 0; - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(ox+fw/3+ i*fw, oy+sy-3, sx, &valstr[i], COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(ox+fw/3+ i*fw, oy+sy-3, sx, &valstr[i], COL_INFOBAR_TEXT); } showInfo(chn); @@ -1635,7 +1635,7 @@ void CChannelList::paintDetails(int index) text3= text3+ " - "; xstart += g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text3, true); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2* fheight, full_width - 30- noch_len, text3, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2* fheight, full_width - 30- noch_len, text3, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); } if (!(text2.empty())) { @@ -1652,12 +1652,12 @@ void CChannelList::paintDetails(int index) } } #endif - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ fdescrheight+ fheight, full_width- xstart- 30- noch_len, text2, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ fdescrheight+ fheight, full_width- xstart- 30- noch_len, text2, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); } - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, full_width - 30 - seit_len, text1, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- seit_len, y+ height+ 5+ fheight, seit_len, cSeit, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- noch_len, y+ height+ 5+ fdescrheight+ fheight, noch_len, cNoch, colored_event_C ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, full_width - 30 - seit_len, text1, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- seit_len, y+ height+ 5+ fheight, seit_len, cSeit, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- noch_len, y+ height+ 5+ fdescrheight+ fheight, noch_len, cNoch, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 } if(g_settings.channellist_foot == 0) { transponder t; @@ -1669,7 +1669,7 @@ void CChannelList::paintDetails(int index) else desc = desc + " (" + CServiceManager::getInstance()->GetSatelliteName(chanlist[index]->getSatellitePosition()) + ")"; - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight +fdescrheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight +fdescrheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK_TEXT, 0, true); } else if( !displayNext && g_settings.channellist_foot == 1) { // next Event char buf[128] = {0}; @@ -1682,8 +1682,8 @@ void CChannelList::paintDetails(int index) snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str()); int from_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cFrom, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight+ fdescrheight, full_width - 30 - from_len, buf, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST :COL_MENUCONTENTDARK, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- from_len, y+ height+ 5+ 2*fheight+ fdescrheight, from_len, cFrom, colored_event_N ? COL_COLORED_EVENTS_CHANNELLIST : COL_MENUCONTENTDARK, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight+ fdescrheight, full_width - 30 - from_len, buf, colored_event_N ? COL_COLORED_EVENTS_TEXT :COL_MENUCONTENTDARK_TEXT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ full_width- 10- from_len, y+ height+ 5+ 2*fheight+ fdescrheight, from_len, cFrom, colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 } } if ((g_settings.channellist_additional) && (p_event != NULL)) @@ -1848,7 +1848,7 @@ void CChannelList::paintButtonBar(bool is_current) void CChannelList::paintItem(int pos, const bool firstpaint) { int ypos = y+ theight + pos*fheight; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; bool iscurrent = true; bool paintbuttons = false; @@ -1865,14 +1865,14 @@ void CChannelList::paintItem(int pos, const bool firstpaint) iscurrent = SameTP(chanlist[curr]); if (curr == selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; paintItem2DetailsLine (pos); paintDetails(curr); c_rad_small = RADIUS_LARGE; paintbuttons = true; } else { - color = iscurrent ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE; + color = iscurrent ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT; bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0; } @@ -1886,7 +1886,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) CZapitChannel* chan = chanlist[curr]; int prg_offset=0; int title_offset=0; - uint8_t tcolor=(liststart + pos == selected) ? color : COL_MENUCONTENTINACTIVE; + uint8_t tcolor=(liststart + pos == selected) ? color : COL_MENUCONTENTINACTIVE_TEXT; int xtheight=fheight-2; if(g_settings.channellist_extended) @@ -2008,7 +2008,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) struct tm *pStartZeit = localtime(&p_event->startTime); snprintf((char*) tmp, sizeof(tmp), "%02d:%02d", pStartZeit->tm_hour, pStartZeit->tm_min); -// g_Font[SNeutrinoSettings::FONT_TYPE_IMAGEINFO_SMALL]->RenderString(x+ 5+ numwidth+ 6, ypos+ xtheight, width- numwidth- 20- 15 -poffs, tmp, COL_MENUCONTENT, 0, true); +// g_Font[SNeutrinoSettings::FONT_TYPE_IMAGEINFO_SMALL]->RenderString(x+ 5+ numwidth+ 6, ypos+ xtheight, width- numwidth- 20- 15 -poffs, tmp, COL_MENUCONTENT_TEXT, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x+ 5+ numwidth+ 6, ypos+ xtheight, width- numwidth- 20- 15 -prg_offset, tmp, tcolor, 0, true); } else @@ -2039,11 +2039,11 @@ void CChannelList::paintItem(int pos, const bool firstpaint) g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10+prg_offset, ypos+ fheight, width- numwidth- 40- 15-prg_offset, nameAndDescription, color, 0, true); if (g_settings.channellist_epgtext_align_right) { // align right - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + width - 20 - ch_desc_len - icon_space - 4, ypos + fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED:(!displayNext ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE) , 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + width - 20 - ch_desc_len - icon_space - 4, ypos + fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED_TEXT:(!displayNext ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT) , 0, true); } else { // align left - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ 5+ numwidth+ 10+ ch_name_len+ 5+prg_offset, ypos+ fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED:(!displayNext ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE) , 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ 5+ numwidth+ 10+ ch_name_len+ 5+prg_offset, ypos+ fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED_TEXT:(!displayNext ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT) , 0, true); } } else { @@ -2086,7 +2086,7 @@ void CChannelList::paintHead() headerClock->setCornerType(CORNER_TOP_RIGHT); headerClock->setYPos(y); headerClock->setHeight(theight); - headerClock->setTextColor(COL_MENUHEAD); + headerClock->setTextColor(COL_MENUHEAD_TEXT); headerClock->setColorBody(COL_MENUHEAD_PLUS_0); headerClock->refresh(); headerClockWidth = headerClock->getWidth(); @@ -2269,12 +2269,12 @@ void CChannelList::paint_events(int index) if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)) { bool first = false; - fb_pixel_t color = COL_MENUCONTENTDARK; + fb_pixel_t color = COL_MENUCONTENTDARK_TEXT; if (e->eventID) { first = (i == 1); if ((first && g_settings.colored_events_channellist == 1 /* current */) || (!first && g_settings.colored_events_channellist == 2 /* next */)) - color = COL_COLORED_EVENTS_CHANNELLIST; + color = COL_COLORED_EVENTS_TEXT; struct tm *tmStartZeit = localtime(&e->startTime); strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit ); //printf("%s %s\n", startTime, e->description.c_str()); @@ -2333,7 +2333,7 @@ void CChannelList::showdescription(int index) frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); for (int i = 1; (i < (int)epgText.size()+1) && ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)); i++) - g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, infozone_width - 20, epgText[i-1].first, COL_MENUCONTENTDARK , 0, true); + g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, infozone_width - 20, epgText[i-1].first, COL_MENUCONTENTDARK_TEXT, 0, true); } void CChannelList::addTextToArray(const std::string & text, int screening) // UTF-8 diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index b302caee5..d78471f63 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -45,7 +45,7 @@ CComponentsButton::CComponentsButton( const int x_pos, const int y_pos, const i initVarButton(); cc_btn_icon = icon_name; cc_btn_capt = caption; - cc_btn_capt_col = COL_MENUCONTENT; + cc_btn_capt_col = COL_MENUCONTENT_TEXT; cc_btn_text_w = cc_btn_font->getRenderWidth(cc_btn_capt, true); cc_btn_text_h = cc_btn_font->getHeight(); @@ -132,7 +132,7 @@ void CComponentsButton::initCaption() //set properties to label object if (cc_btn_capt_obj){ cc_btn_capt_obj->setDimensionsAll(cap_x, cap_y, width-cap_x, height); - cc_btn_capt_obj->setTextColor(this->cc_item_enabled ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE); + cc_btn_capt_obj->setTextColor(this->cc_item_enabled ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT); cc_btn_capt_obj->setText(cc_btn_capt, CTextBox::NO_AUTO_LINEBREAK, cc_btn_font); cc_btn_capt_obj->forceTextPaint(); //here required; cc_btn_capt_obj->doPaintBg(false); diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 8356d60fc..eda580c72 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -70,7 +70,7 @@ void CComponentsFrmClock::initVarClock() corner_rad = RADIUS_SMALL; cl_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]; - cl_col_text = COL_MENUCONTENT; + cl_col_text = COL_MENUCONTENT_TEXT; cl_format_str = "%H:%M"; cl_align = CC_ALIGN_VER_CENTER | CC_ALIGN_HOR_CENTER; diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 4e9067f3a..da53e5de2 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -107,7 +107,7 @@ void CComponentsHeader::initVarHeader() cch_icon_name = NULL; cch_btn_obj = NULL; cch_text = ""; - cch_col_text = COL_MENUHEAD; + cch_col_text = COL_MENUHEAD_TEXT; cch_items_y = 0; cch_offset = 8; cch_icon_x = cch_offset; diff --git a/src/gui/components/cc_item_infobox.h b/src/gui/components/cc_item_infobox.h index 3e23de78f..afcfffd5b 100644 --- a/src/gui/components/cc_item_infobox.h +++ b/src/gui/components/cc_item_infobox.h @@ -67,7 +67,7 @@ class CComponentsInfoBox : public CComponentsText CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h, std::string info_text = "", const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL, bool has_shadow = CC_SHADOW_OFF, - fb_pixel_t color_text = COL_MENUCONTENT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); + 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_MENUCONTENTDARK_PLUS_0); ~CComponentsInfoBox(); diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index afb3e6a88..33d828b99 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -102,7 +102,7 @@ void CComponentsText::initVarText() ct_text_Hborder = 1; ct_text_Vborder = 0; - ct_col_text = COL_MENUCONTENT; + ct_col_text = COL_MENUCONTENT_TEXT; ct_text_sent = false; ct_paint_textbg = false; ct_force_text_paint = false; diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index 37915331e..0e1815c9e 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -87,7 +87,7 @@ class CComponentsText : public CComponentsItem CComponentsText( const int x_pos, const int y_pos, const int w, const int h, std::string text = "", const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL, bool has_shadow = CC_SHADOW_OFF, - fb_pixel_t color_text = COL_MENUCONTENT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); + 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_MENUCONTENTDARK_PLUS_0); virtual ~CComponentsText(); ///default members to paint a text box and hide painted text @@ -146,7 +146,7 @@ class CComponentsLabel : public CComponentsText CComponentsLabel( const int x_pos, const int y_pos, const int w, const int h, std::string text = "", const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL, bool has_shadow = CC_SHADOW_OFF, - fb_pixel_t color_text = COL_MENUCONTENTINACTIVE, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0) + fb_pixel_t color_text = COL_MENUCONTENTINACTIVE_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_MENUCONTENTDARK_PLUS_0) :CComponentsText(x_pos, y_pos, w, h, text, mode, font_text, has_shadow, color_text, color_frame, color_body, color_shadow) { cc_item_type = CC_ITEMTYPE_LABEL; @@ -155,7 +155,7 @@ class CComponentsLabel : public CComponentsText { initVarText(); cc_item_type = CC_ITEMTYPE_LABEL; - ct_col_text = COL_MENUCONTENTINACTIVE; + ct_col_text = COL_MENUCONTENTINACTIVE_TEXT; }; }; diff --git a/src/gui/components/unmaintained/cc_item_box.cpp b/src/gui/components/unmaintained/cc_item_box.cpp index e84067a83..29140ebc2 100644 --- a/src/gui/components/unmaintained/cc_item_box.cpp +++ b/src/gui/components/unmaintained/cc_item_box.cpp @@ -55,7 +55,7 @@ void CComponentsItemBox::initVarItemBox() initVarItem(); //CComponentsItemBox - it_col_text = COL_MENUCONTENT; + it_col_text = COL_MENUCONTENT_TEXT; hSpacer = 2; hOffset = 4; vOffset = 1; @@ -498,7 +498,7 @@ void CComponentsTitleBar::initVarTitleBar() onlyOneTextElement = true; font_text = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; - it_col_text = COL_MENUHEAD; + it_col_text = COL_MENUHEAD_TEXT; //CComponents x = 0; diff --git a/src/gui/components/unmaintained/cc_misc.h b/src/gui/components/unmaintained/cc_misc.h index 728019abc..cda11f389 100644 --- a/src/gui/components/unmaintained/cc_misc.h +++ b/src/gui/components/unmaintained/cc_misc.h @@ -100,11 +100,11 @@ class CComponentsTitleBar : public CComponentsItemBox public: CComponentsTitleBar(); CComponentsTitleBar( const int x_pos, const int y_pos, const int w, const int h, const char* c_text = NULL, const std::string& s_icon ="", - fb_pixel_t color_text = COL_MENUHEAD, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0); + fb_pixel_t color_text = COL_MENUHEAD_TEXT, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0); CComponentsTitleBar( const int x_pos, const int y_pos, const int w, const int h, const std::string& s_text ="", const std::string& s_icon ="", - fb_pixel_t color_text = COL_MENUHEAD, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0); + fb_pixel_t color_text = COL_MENUHEAD_TEXT, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0); CComponentsTitleBar( const int x_pos, const int y_pos, const int w, const int h, neutrino_locale_t locale_text = NONEXISTANT_LOCALE, const std::string& s_icon ="", - fb_pixel_t color_text = COL_MENUHEAD, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0); + fb_pixel_t color_text = COL_MENUHEAD_TEXT, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0); void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 7da5b5cba..45c2486e1 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -259,7 +259,7 @@ void CDBoxInfoWidget::paint() if (p) hw=++p; hw+=" Info"; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, y + hheight+1, width - 10, hw.c_str(), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, y + hheight+1, width - 10, hw.c_str(), COL_MENUHEAD_TEXT, 0, true); // UTF-8 break; } i++; @@ -267,7 +267,7 @@ void CDBoxInfoWidget::paint() continue; if (read > 0 && buffer[read-1] == '\n') buffer[read-1] = '\0'; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width - 10, buffer, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width - 10, buffer, COL_MENUCONTENT_TEXT); ypos+= mheight; } fclose(fd); @@ -313,7 +313,7 @@ void CDBoxInfoWidget::paint() LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]), LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2])); strcat(sbuf, ubuf); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width - 10, sbuf, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width - 10, sbuf, COL_MENUCONTENT_TEXT); ypos+= mheight/2; ypos+= mheight; int headOffset=0; @@ -340,7 +340,7 @@ void CDBoxInfoWidget::paint() headOffset = nameOffset + (sizeOffset+10)*3+15; break; } - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ headOffset, ypos+ mheight, width - 10, head[j], COL_MENUCONTENTINACTIVE); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ headOffset, ypos+ mheight, width - 10, head[j], COL_MENUCONTENTINACTIVE_TEXT); } ypos+= mheight; @@ -434,7 +434,7 @@ void CDBoxInfoWidget::paint() snprintf(ubuf, buf_size, "%4d%%", percent_used); break; } - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x + mpOffset, ypos+ mheight, width - 10, ubuf, rec_mp ? COL_MENUCONTENTINACTIVE:COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x + mpOffset, ypos+ mheight, width - 10, ubuf, rec_mp ? COL_MENUCONTENTINACTIVE_TEXT:COL_MENUCONTENT_TEXT); rec_mp = false; } int pbw = width - offsetw - 10; diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 0d4ee75cc..3ee640c51 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -50,8 +50,8 @@ #include #include -#define COL_MENUCONTENT_P1 254-8*4+1 -#define COL_MENUCONTENT_P2 254-8*4+2 +#define COL_MENUCONTENT_P1 COL_MENUCONTENT_TEXT_PLUS_1 +#define COL_MENUCONTENT_P2 COL_MENUCONTENT_TEXT_PLUS_2 extern CBouquetList *bouquetList; Font * fonts[EpgPlus::NumberOfFontSettings]; @@ -126,8 +126,8 @@ void EpgPlus::Header::paint(const char * Name) } this->frameBuffer->paintBoxRel (this->x, this->y, this->width, this->font->getHeight()+4, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); this->font->RenderString (this->x + 10, this->y + this->font->getHeight() + 2, - this->width - 20, head, COL_MENUHEAD, 0, true); - //this->width - 20, g_Locale->getText (LOCALE_EPGPLUS_HEAD) , COL_MENUHEAD, 0, true); + this->width - 20, head, COL_MENUHEAD_TEXT, 0, true); + //this->width - 20, g_Locale->getText (LOCALE_EPGPLUS_HEAD) , COL_MENUHEAD_TEXT, 0, true); int icol_w, icol_h; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_HELP, &icol_w, &icol_h); this->frameBuffer->paintIcon (NEUTRINO_ICON_BUTTON_HELP, this->x + this->width - icol_w - RADIUS_LARGE - 10, this->y+ ((this->font->getHeight()-icol_h)/2), icol_h); @@ -179,7 +179,7 @@ void EpgPlus::TimeLine::paint (time_t startTime, int pduration) , toggleColor ? COL_MENUCONTENT_PLUS_2 : COL_MENUCONTENT_PLUS_1); this->fontDate->RenderString (this->x + 4, this->y + this->fontDate->getHeight() - , this->width, EpgPlus::getTimeString (startTime, "%d-%b") , COL_MENUCONTENT, 0, true); // UTF-8 + , this->width, EpgPlus::getTimeString (startTime, "%d-%b") , COL_MENUCONTENT_TEXT, 0, true); // UTF-8 // paint ticks for (int i = 0; i < numberOfTicks; ++i, xPos += tickDist, tickTime += pduration / numberOfTicks) { @@ -232,7 +232,7 @@ void EpgPlus::TimeLine::paintMark (time_t startTime, int pduration, int px, int int textWidth = this->fontTime->getRenderWidth (timeStr, true); this->fontTime->RenderString (px - textWidth, this->y + this->fontTime->getHeight() + this->fontTime->getHeight() - , textWidth, timeStr, COL_MENUCONTENT, 0, true); // UTF-8 + , textWidth, timeStr, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 // display end time after mark timeStr = EpgPlus::getTimeString (startTime + pduration, "%H:%M"); @@ -240,10 +240,10 @@ void EpgPlus::TimeLine::paintMark (time_t startTime, int pduration, int px, int if (px + pwidth + textWidth < this->x + this->width) { this->fontTime->RenderString (px + pwidth, this->y + this->fontTime->getHeight() + this->fontTime->getHeight() - , textWidth, timeStr, COL_MENUCONTENT, 0, true); // UTF-8 + , textWidth, timeStr, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } else if (textWidth < pwidth - 10) { this->fontTime->RenderString (px + pwidth - textWidth, this->y + this->fontTime->getHeight() + this->fontTime->getHeight() - , textWidth, timeStr, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + , textWidth, timeStr, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 } } @@ -297,7 +297,7 @@ void EpgPlus::ChannelEventEntry::paint (bool pisSelected, bool toggleColor) , this->channelEvent.description.empty()? COL_MENUCONTENT_PLUS_0 : (pisSelected ? COL_MENUCONTENTSELECTED_PLUS_0 : (toggleColor ? COL_MENUCONTENT_PLUS_1 : COL_MENUCONTENT_PLUS_2))); this->font->RenderString (this->x + 2, this->y + this->font->getHeight() - , this->width - 4 > 0 ? this->width - 4 : 0, this->channelEvent.description, pisSelected ? COL_MENUCONTENTSELECTED : (toggleColor ? COL_MENUCONTENT_P1 : COL_MENUCONTENT_P2) + , this->width - 4 > 0 ? this->width - 4 : 0, this->channelEvent.description, pisSelected ? COL_MENUCONTENTSELECTED_TEXT : (toggleColor ? COL_MENUCONTENT_P1 : COL_MENUCONTENT_P2) , 0, true); // paint the separation line @@ -374,7 +374,7 @@ void EpgPlus::ChannelEntry::paint (bool isSelected, time_t selectedTime) isSelected ? COL_MENUCONTENTSELECTED_PLUS_0 : COL_MENUCONTENT_PLUS_0); this->font->RenderString (this->x + 2, this->y + this->font->getHeight(), - this->width - 4, this->displayName, isSelected ? COL_MENUCONTENTSELECTED : COL_MENUCONTENT, 0, true); + this->width - 4, this->displayName, isSelected ? COL_MENUCONTENTSELECTED_TEXT : COL_MENUCONTENT_TEXT, 0, true); if (isSelected) { #if 0 @@ -475,7 +475,7 @@ void EpgPlus::Footer::paintEventDetails (const std::string & description, const yPos += height; // display new text - this->fontBouquetChannelName->RenderString (this->x + 10, yPos, this->width - 20, this->currentBouquetName + " : " + this->currentChannelName, COL_MENUHEAD, 0, true); + this->fontBouquetChannelName->RenderString (this->x + 10, yPos, this->width - 20, this->currentBouquetName + " : " + this->currentChannelName, COL_MENUHEAD_TEXT, 0, true); height = this->fontEventDescription->getHeight(); @@ -485,7 +485,7 @@ void EpgPlus::Footer::paintEventDetails (const std::string & description, const yPos += height; // display new text - this->fontEventDescription->RenderString (this->x + 10, yPos, this->width - 20, description, COL_MENUHEAD, 0, true); + this->fontEventDescription->RenderString (this->x + 10, yPos, this->width - 20, description, COL_MENUHEAD_TEXT, 0, true); height = this->fontEventShortDescription->getHeight(); @@ -495,7 +495,7 @@ void EpgPlus::Footer::paintEventDetails (const std::string & description, const yPos += height; // display new text - this->fontEventShortDescription->RenderString (this->x + 10, yPos, this->width - 20, shortDescription, COL_MENUHEAD, 0, true); + this->fontEventShortDescription->RenderString (this->x + 10, yPos, this->width - 20, shortDescription, COL_MENUHEAD_TEXT, 0, true); } struct button_label buttonLabels[] = { diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index de5bf35a4..1601220e2 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -248,7 +248,7 @@ void CEpgData::showText( int startPos, int ypos ) offset += digi; break; } - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15, epgText[i].first.substr(pos1, pos2 - pos1), (epgText[i].second==2)? COL_MENUCONTENTINACTIVE: COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15, epgText[i].first.substr(pos1, pos2 - pos1), (epgText[i].second==2)? COL_MENUCONTENTINACTIVE_TEXT: COL_MENUCONTENT_TEXT, 0, true); // UTF-8 count++; pos1 = epgText[i].first.find_first_not_of(tok, pos2); pos2 = epgText[i].first.find_first_of(tok, pos1); @@ -257,7 +257,7 @@ void CEpgData::showText( int startPos, int ypos ) count = 0; } else{ - g_Font[( i< info1_lines ) ?SNeutrinoSettings::FONT_TYPE_EPG_INFO1:SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10, y+medlineheight, ox- 15- 15, epgText[i].first, COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[( i< info1_lines ) ?SNeutrinoSettings::FONT_TYPE_EPG_INFO1:SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10, y+medlineheight, ox- 15- 15, epgText[i].first, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } } @@ -623,9 +623,9 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start g_PicViewer->DisplayImage(lname, sx+10, sy + (toph-logo_h)/2, logo_w, logo_h); //show the title - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->RenderString(sx+15 + pic_offx, sy + topheight+ 3, ox-15- pic_offx, text1, COL_MENUHEAD, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->RenderString(sx+15 + pic_offx, sy + topheight+ 3, ox-15- pic_offx, text1, COL_MENUHEAD_TEXT, 0, true); if (!(text2.empty())) - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->RenderString(sx+15+ pic_offx, sy+ 2* topheight+ 3, ox-15 - pic_offx, text2, COL_MENUHEAD, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->RenderString(sx+15+ pic_offx, sy+ 2* topheight+ 3, ox-15 - pic_offx, text2, COL_MENUHEAD_TEXT, 0, true); //show date-time.... frameBuffer->paintBoxRel(sx, sy+oy-botboxheight, ox, botboxheight, COL_MENUHEAD_PLUS_0); @@ -636,9 +636,9 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start fromto += epg_end; widthl = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(fromto); - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+40, sy+oy-3, widthl, fromto, COL_MENUHEAD); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+40, sy+oy-3, widthl, fromto, COL_MENUHEAD_TEXT); widthr = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(epg_date); - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ox-40-widthr, sy+oy-3, widthr, epg_date, COL_MENUHEAD, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ox-40-widthr, sy+oy-3, widthr, epg_date, COL_MENUHEAD_TEXT, 0, true); int showPos = 0; textCount = epgText.size(); @@ -681,13 +681,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start if ((prev_id != 0) && !call_fromfollowlist) { frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3); - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 3); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT_TEXT_PLUS_3); } if ((next_id != 0) && !call_fromfollowlist) { frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3); - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 3); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT_TEXT_PLUS_3); } if ( doLoop ) @@ -741,7 +741,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start if ((prev_id != 0) && !call_fromfollowlist) { frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1); - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 1); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT_TEXT_PLUS_1); show(channel_id, prev_id, &prev_zeit, false); showPos=0; @@ -752,7 +752,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start if ((next_id != 0) && !call_fromfollowlist) { frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1); - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 1); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT_TEXT_PLUS_1); show(channel_id, next_id, &next_zeit, false); showPos=0; @@ -1168,12 +1168,12 @@ void CEpgData::showTimerEventBar (bool pshow) { pos = 0; frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x+8+cellwidth*pos, y+h_offset ); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+29+cellwidth*pos, y+h-h_offset, w-30, g_Locale->getText(LOCALE_TIMERBAR_RECORDEVENT), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+29+cellwidth*pos, y+h-h_offset, w-30, g_Locale->getText(LOCALE_TIMERBAR_RECORDEVENT), COL_INFOBAR_TEXT, 0, true); // UTF-8 } // Button: Timer Channelswitch pos = 2; frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x+8+cellwidth*pos, y+h_offset ); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+29+cellwidth*pos, y+h-h_offset, w-30, g_Locale->getText(LOCALE_TIMERBAR_CHANNELSWITCH), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+29+cellwidth*pos, y+h-h_offset, w-30, g_Locale->getText(LOCALE_TIMERBAR_CHANNELSWITCH), COL_INFOBAR_TEXT, 0, true); // UTF-8 #endif } diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 78a167d91..b581de234 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -250,7 +250,7 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c // Calculate iheight (we assume the red button is the largest one?) struct button_label tmp_button[1] = { { NEUTRINO_ICON_BUTTON_RED, LOCALE_EVENTLISTBAR_RECORDEVENT } }; - iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, "", false, COL_INFOBAR_SHADOW, NULL, 0, false); + iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, "", false, COL_INFOBAR_SHADOW_TEXT, NULL, 0, false); // Calculate theight theight = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getHeight(); @@ -702,7 +702,7 @@ CTimerd::CTimerEventTypes CNeutrinoEventList::isScheduled(t_channel_id channel_i void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI) { - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; int ypos = y+ theight+0 + pos*fheight; unsigned int curpos = liststart + pos; @@ -712,17 +712,17 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI) if (curpos==selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else if (curpos == current_event ) { - color = COL_MENUCONTENT + 1; + color = COL_MENUCONTENT_TEXT_PLUS_1; bgcolor = COL_MENUCONTENT_PLUS_1; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } @@ -865,9 +865,9 @@ void CNeutrinoEventList::paintHead(std::string _channelname, std::string _channe middle_offset = 0; } - g_Font[font_h]->RenderString(x+10,y+theight-pn_y_off+1, prev_len, _channelname_prev.c_str(), COL_INFOBAR, 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->RenderString(x+prev_len+middle_offset,y+theight+1, middle_len, _channelname.c_str(), COL_MENUHEAD, 0, true); // UTF-8 - g_Font[font_h]->RenderString(x+full_width-next_len-10,y+theight-pn_y_off+1, next_len, _channelname_next.c_str(), COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_h]->RenderString(x+10,y+theight-pn_y_off+1, prev_len, _channelname_prev.c_str(), COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->RenderString(x+prev_len+middle_offset,y+theight+1, middle_len, _channelname.c_str(), COL_MENUHEAD_TEXT, 0, true); // UTF-8 + g_Font[font_h]->RenderString(x+full_width-next_len-10,y+theight-pn_y_off+1, next_len, _channelname_next.c_str(), COL_INFOBAR_TEXT, 0, true); // UTF-8 } @@ -886,7 +886,7 @@ void CNeutrinoEventList::paintHead(t_channel_id _channel_id, std::string _channe logo_ok = g_PicViewer->DisplayImage(lname, x+10, y+(theight-logo_h)/2, logo_w, logo_h); } else - g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->RenderString(x+15+(logo_ok? 5+logo_w:0),y+theight+1, full_width, _channelname.c_str(), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->RenderString(x+15+(logo_ok? 5+logo_w:0),y+theight+1, full_width, _channelname.c_str(), COL_MENUHEAD_TEXT, 0, true); // UTF-8 } void CNeutrinoEventList::paint(t_channel_id channel_id) diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 2d3ae691d..0dafb8ff9 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1239,7 +1239,7 @@ void CFileBrowser::paintItem(unsigned int pos) { int colwidth1, colwidth2, colwidth3; int c_rad_small; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; int ypos = y+ theight+0 + pos*fheight; CFile * actual_file = NULL; @@ -1247,14 +1247,14 @@ void CFileBrowser::paintItem(unsigned int pos) if (liststart + pos == selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; c_rad_small = RADIUS_SMALL; // paintFoot(); } else { - color = COL_MENUCONTENT;//DARK; + color = COL_MENUCONTENT_TEXT;//DARK; bgcolor = COL_MENUCONTENT_PLUS_0;//DARK; c_rad_small = 0; } @@ -1267,8 +1267,14 @@ void CFileBrowser::paintItem(unsigned int pos) actual_file = &filelist[liststart+pos]; if (actual_file->Marked) { - color = COL_MENUCONTENTINACTIVE; //+= 2; FIXME - bgcolor = (liststart + pos == selected) ? COL_MENUCONTENTSELECTED_PLUS_2 : COL_MENUCONTENT_PLUS_2; + if (liststart + pos == selected) { + color = COL_MENUCONTENTINACTIVE_TEXT; + bgcolor = COL_MENUCONTENTSELECTED_PLUS_2; + } + else { + color = COL_MENUCONTENT_TEXT; + bgcolor = COL_MENUCONTENT_PLUS_2; + } } if (g_settings.filebrowser_showrights == 0 && S_ISREG(actual_file->Mode)) @@ -1293,7 +1299,7 @@ void CFileBrowser::paintItem(unsigned int pos) case CFile::FILE_FLAC: #endif fileicon = NEUTRINO_ICON_MP3; -// color = COL_MENUCONTENT; +// color = COL_MENUCONTENT_TEXT; break; case CFile::FILE_DIR: @@ -1505,7 +1511,7 @@ void CFileBrowser::paintFoot() char cKey[2]={m_SMSKeyInput.getOldKey(),0}; cKey[0] = toupper(cKey[0]); int len = fnt_small->getRenderWidth(cKey); - fnt_small->RenderString(x + width - 10 - len, by2 + foheight, len, cKey, COL_MENUHEAD, 0, true); + fnt_small->RenderString(x + width - 10 - len, by2 + foheight, len, cKey, COL_MENUHEAD_TEXT, 0, true); } } } diff --git a/src/gui/infoclock.cpp b/src/gui/infoclock.cpp index 44fe7f045..9ea868ce9 100644 --- a/src/gui/infoclock.cpp +++ b/src/gui/infoclock.cpp @@ -63,7 +63,7 @@ void CInfoClock::paintTime( bool show_dot) int x_diff = (time_width - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(timestr)) / 2; frameBuffer->paintBoxRel(clock_x, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(clock_x + x_diff, y + digit_h + digit_offset + ((time_height - digit_h) / 2), time_width, timestr, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(clock_x + x_diff, y + digit_h + digit_offset + ((time_height - digit_h) / 2), time_width, timestr, COL_MENUCONTENT_TEXT); } void* CInfoClock::TimerProc(void *arg) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index f6aa75332..27db7e516 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -255,7 +255,7 @@ void CInfoViewer::paintTime (bool show_dot, bool firstPaint) if (show_dot) frameBuffer->paintBoxRel (BoxEndX - time_width + time_left_width - LEFT_OFFSET, ChanNameY, time_dot_width, time_height / 2 + 2, COL_INFOBAR_PLUS_0); else - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_width + time_left_width - LEFT_OFFSET, ChanNameY + time_height, time_dot_width, ":", COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_width + time_left_width - LEFT_OFFSET, ChanNameY + time_height, time_dot_width, ":", COL_INFOBAR_TEXT); strcpy (old_timestr, timestr); } else { strcpy (old_timestr, timestr); @@ -265,9 +265,9 @@ void CInfoViewer::paintTime (bool show_dot, bool firstPaint) } timestr[2] = 0; - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_width - LEFT_OFFSET, ChanNameY + time_height, time_left_width, timestr, COL_INFOBAR); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_left_width - LEFT_OFFSET, ChanNameY + time_height, time_left_width, ×tr[3], COL_INFOBAR); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_width + time_left_width - LEFT_OFFSET, ChanNameY + time_height, time_dot_width, ":", COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_width - LEFT_OFFSET, ChanNameY + time_height, time_left_width, timestr, COL_INFOBAR_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_left_width - LEFT_OFFSET, ChanNameY + time_height, time_left_width, ×tr[3], COL_INFOBAR_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString (BoxEndX - time_width + time_left_width - LEFT_OFFSET, ChanNameY + time_height, time_dot_width, ":", COL_INFOBAR_TEXT); if (show_dot) frameBuffer->paintBoxRel (BoxEndX - time_left_width - time_dot_width - LEFT_OFFSET, ChanNameY, time_dot_width, time_height / 2 + 2, COL_INFOBAR_PLUS_0); } @@ -342,7 +342,7 @@ void CInfoViewer::showRecordIcon (const bool show) frameBuffer->paintBoxRel(box_posX, BoxStartY + box_posY , box_len, chanH, COL_INFOBAR_PLUS_0, radius); if (rec_mode != CRecordManager::RECMODE_TSHIFT) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (rec_icon_posX + rec_icon_w + icon_space, BoxStartY + box_posY + chanH, box_len, records_msg, COL_INFOBAR, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (rec_icon_posX + rec_icon_w + icon_space, BoxStartY + box_posY + chanH, box_len, records_msg, COL_INFOBAR_TEXT, 0, true); if (rec_mode == CRecordManager::RECMODE_REC) { @@ -521,7 +521,7 @@ void CInfoViewer::showMovieTitle(const int playState, const std::string &Channel infoViewerBB->paintshowButtonBar(); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(ChanNameX + 10 , ChanNameY + time_height,BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 ,ChannelName, COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(ChanNameX + 10 , ChanNameY + time_height,BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 ,ChannelName, COL_INFOBAR_TEXT, 0, true); // UTF-8 // show_Data if (CMoviePlayerGui::getInstance().file_prozent > 100) @@ -570,7 +570,7 @@ void CInfoViewer::showMovieTitle(const int playState, const std::string &Channel if (speed) { int sh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); int sy = BoxStartY + ChanHeight/2 - sh/2 + sh; - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(icon_x, sy, ChanHeight, runningRest, COL_INFOBAR, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(icon_x, sy, ChanHeight, runningRest, COL_INFOBAR_TEXT, 0, true); icon_x += speedw; } frameBuffer->paintIcon(playicon, icon_x, icon_y); @@ -651,14 +651,14 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con is_visible = true; infoViewerBB->is_visible = true; - int col_NumBoxText = COL_INFOBAR; - int col_NumBox = COL_INFOBAR_PLUS_0; + fb_pixel_t col_NumBoxText = COL_INFOBAR_TEXT; + fb_pixel_t col_NumBox = COL_INFOBAR_PLUS_0; ChannelName = Channel; bool new_chan = false; if (virtual_zap_mode) { if (g_RemoteControl->current_channel_id != new_channel_id) { - col_NumBoxText = COL_MENUHEAD; + col_NumBoxText = COL_MENUHEAD_TEXT; } if ((channel_id != new_channel_id) || (evtlist.empty())) { CEitManager::getInstance()->getEventsServiceKey(new_channel_id, evtlist); @@ -727,7 +727,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con } } int chanH = g_SignalFont->getHeight (); - g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2) , BoxStartY + chanH, satNameWidth, satname_tmp, COL_INFOBAR); + g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2) , BoxStartY + chanH, satNameWidth, satname_tmp, COL_INFOBAR_TEXT); ChanNumYPos += 10; } @@ -752,12 +752,12 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con if (g_settings.infobar_show_channellogo < 5 || !logo_ok) { if (ChannelLogoMode != 2) { //FIXME good color to display inactive for zap ? - //uint8_t color = CNeutrinoApp::getInstance ()->channelList->SameTP(new_channel_id) ? COL_INFOBAR : COL_INFOBAR_SHADOW; - uint8_t color = COL_INFOBAR; + //fb_pixel_t color = CNeutrinoApp::getInstance ()->channelList->SameTP(new_channel_id) ? COL_INFOBAR_TEXT : COL_INFOBAR_SHADOW_TEXT; + fb_pixel_t color = COL_INFOBAR_TEXT; g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString( ChanNameX + 10 + ChanNumWidth, ChanNameY + time_height, BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth, - ChannelName, color /*COL_INFOBAR*/, 0, true); // UTF-8 + ChannelName, color /*COL_INFOBAR_TEXT*/, 0, true); // UTF-8 //provider name if(g_settings.infobar_show_channeldesc && pname){ std::string prov_name = pname; @@ -771,7 +771,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString( ChanNameX + 10 + ChanNumWidth + chname_width, ChanNameY + time_height -SHADOW_OFFSET/2, BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth - chname_width, - prov_name, color /*COL_INFOBAR*/, 0, true); // UTF-8 + prov_name, color /*COL_INFOBAR_TEXT*/, 0, true); // UTF-8 } } @@ -1038,15 +1038,15 @@ void CInfoViewer::showSubchan () lframeBuffer->paintBackgroundBoxRel (x + dx, y, borderwidth, dy); lframeBuffer->paintBoxRel (x, y, dx, dy, COL_MENUCONTENT_PLUS_0); - //g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + 30, dx - 20, text, COL_MENUCONTENT, 0, true); + //g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + 30, dx - 20, text, COL_MENUCONTENT_TEXT, 0, true); if (g_RemoteControl->director_mode) { lframeBuffer->paintIcon (NEUTRINO_ICON_BUTTON_YELLOW, x + 8, y + dy - 20); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - h - 2, dx - 20, text, COL_MENUCONTENT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - h - 2, dx - 20, text, COL_MENUCONTENT_TEXT, 0, true); } else - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT_TEXT, 0, true); uint64_t timeoutEnd_tmp = CRCInput::calcTimeoutEnd (2); int res = messages_return::none; @@ -1135,7 +1135,7 @@ void CInfoViewer::showRadiotext() // shadow frameBuffer->paintBoxRel(rt_x+SHADOW_OFFSET, rt_y+SHADOW_OFFSET, rt_dx, rt_dy, COL_INFOBAR_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, 0, RTisIsUTF); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rt_x+10, rt_y+ 30, rt_dx-20, stext[0], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8 } // yoff = 17; ii = 1; @@ -1172,15 +1172,15 @@ void CInfoViewer::showRadiotext() int rts_dx = rt_dx-20; if (g_Radiotext->S_RtOsdLoop == 1) { // latest bottom for (int i = ind+1; i < g_Radiotext->S_RtOsdRows; i++) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR, 0, RTisIsUTF); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8 for (int i = 0; i <= ind; i++) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR, 0, RTisIsUTF); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8 } else { // latest top for (int i = ind; i >= 0; i--) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR, 0, RTisIsUTF); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8 for (int i = g_Radiotext->S_RtOsdRows-1; i > ind; i--) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR, 0, RTisIsUTF); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8 } } #if 0 @@ -1427,7 +1427,7 @@ void CInfoViewer::showSNR () snprintf (freq, sizeof(freq), "%d.%d MHz %s", frequency / 1000, frequency % 1000, polarisation.c_str()); int satNameWidth = g_SignalFont->getRenderWidth (freq); - g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), BoxStartY + 2 * chanH - 3, satNameWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_INFOBAR:COL_INFOBAR); + g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), BoxStartY + 2 * chanH - 3, satNameWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_TEXT:COL_INFOBAR_TEXT); SDT_freq_update = false; } int sw, snr, sig, posx, posy; @@ -1452,7 +1452,7 @@ void CInfoViewer::showSNR () posx = posx + bar_width + 2; sw = BoxStartX + ChanWidth - posx; frameBuffer->paintBoxRel (posx, posy, sw, height, COL_INFOBAR_PLUS_0); - g_SignalFont->RenderString (posx, posy + height, sw, percent, COL_INFOBAR); + g_SignalFont->RenderString (posx, posy + height, sw, percent, COL_INFOBAR_TEXT); } if (lastsnr != snr) { lastsnr = snr; @@ -1466,7 +1466,7 @@ void CInfoViewer::showSNR () posx = posx + bar_width + 2; sw = BoxStartX + ChanWidth - posx -4; frameBuffer->paintBoxRel (posx, posy, sw, height-2, COL_INFOBAR_PLUS_0); - g_SignalFont->RenderString (posx, posy + height, sw, percent, COL_INFOBAR); + g_SignalFont->RenderString (posx, posy + height, sw, percent, COL_INFOBAR_TEXT); } } if(showButtonBar) @@ -1583,8 +1583,8 @@ void CInfoViewer::display_Info(const char *current, const char *next, { frameBuffer->paintBox(InfoX, CurrInfoY - height, currTimeX, CurrInfoY, COL_INFOBAR_PLUS_0); if (runningStart != NULL) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, CurrInfoY, info_time_width, runningStart, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, CurrInfoY, currTimeX - xStart - 5, current, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, CurrInfoY, info_time_width, runningStart, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, UTF8); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, CurrInfoY, currTimeX - xStart - 5, current, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, UTF8); oldCurrTimeX = currTimeX; } @@ -1593,19 +1593,19 @@ void CInfoViewer::display_Info(const char *current, const char *next, frameBuffer->paintBox(oldCurrTimeX, CurrInfoY-height, BoxEndX, CurrInfoY, COL_INFOBAR_PLUS_0); oldCurrTimeX = currTimeX; if (currTimeW != 0) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(currTimeX, CurrInfoY, currTimeW, runningRest, colored_event_C ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(currTimeX, CurrInfoY, currTimeW, runningRest, colored_event_C ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, UTF8); if (next != NULL && update_next) { frameBuffer->paintBox(InfoX, NextInfoY-height, BoxEndX, NextInfoY, COL_INFOBAR_PLUS_0); if (nextStart != NULL) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, NextInfoY, info_time_width, nextStart, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(InfoX, NextInfoY, info_time_width, nextStart, colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, UTF8); if (starttimes) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, UTF8); else - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8); + g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(xStart, NextInfoY, nextTimeX - xStart - 5, next, colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, UTF8); if (nextTimeW != 0) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(nextTimeX, NextInfoY, nextTimeW, nextDuration, colored_event_N ? COL_COLORED_EVENTS_INFOBAR : COL_INFOBAR, 0, UTF8); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(nextTimeX, NextInfoY, nextTimeW, nextDuration, colored_event_N ? COL_COLORED_EVENTS_TEXT : COL_INFOBAR_TEXT, 0, UTF8); } } @@ -1760,7 +1760,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) // no EPG available ChanInfoY += height; frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (BoxStartX + ChanWidth + 20, ChanInfoY + height, BoxEndX - (BoxStartX + ChanWidth + 20), g_Locale->getText (gotTime ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (BoxStartX + ChanWidth + 20, ChanInfoY + height, BoxEndX - (BoxStartX + ChanWidth + 20), g_Locale->getText (gotTime ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), COL_INFOBAR_TEXT, 0, true); // UTF-8 } else { // irgendein EPG gefunden int duration1Width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth (runningRest); @@ -1772,7 +1772,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) if ((info_CurrentNext.flags & CSectionsdClient::epgflags::has_next) && (!(info_CurrentNext.flags & CSectionsdClient::epgflags::has_current))) { // there are later events available - yet no current frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, BoxEndX - xStart, g_Locale->getText (LOCALE_INFOVIEWER_NOCURRENT), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, BoxEndX - xStart, g_Locale->getText (LOCALE_INFOVIEWER_NOCURRENT), COL_INFOBAR_TEXT, 0, true); // UTF-8 ChanInfoY += height; @@ -1781,21 +1781,21 @@ void CInfoViewer::show_Data (bool calledFromEvent) if (last_next_id != info_CurrentNext.next_uniqueKey) { frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR_TEXT); last_next_id = info_CurrentNext.next_uniqueKey; } } else { if (last_curr_id != info_CurrentNext.current_uniqueKey) { frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, runningStart, COL_INFOBAR); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration1TextPos - xStart - 5, info_CurrentNext.current_name, COL_INFOBAR, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, runningStart, COL_INFOBAR_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration1TextPos - xStart - 5, info_CurrentNext.current_name, COL_INFOBAR_TEXT, 0, true); last_curr_id = info_CurrentNext.current_uniqueKey; } frameBuffer->paintBox (BoxEndX - 80, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);//FIXME duration1TextPos not really good - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration1TextPos, ChanInfoY + height, duration1Width, runningRest, COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration1TextPos, ChanInfoY + height, duration1Width, runningRest, COL_INFOBAR_TEXT); ChanInfoY += height; @@ -1805,9 +1805,9 @@ void CInfoViewer::show_Data (bool calledFromEvent) if ((!is_nvod) && (info_CurrentNext.flags & CSectionsdClient::epgflags::has_next)) { if (last_next_id != info_CurrentNext.next_uniqueKey) { frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR_TEXT); last_next_id = info_CurrentNext.next_uniqueKey; } } //else @@ -1867,7 +1867,7 @@ void CInfoViewer::showInfoFile() infobar_txt->setDimensionsAll(xStart, yStart, width, height); infobar_txt->setCornerRadius(RADIUS_SMALL); infobar_txt->setShadowOnOff(true); - infobar_txt->setTextColor(COL_INFOBAR); + infobar_txt->setTextColor(COL_INFOBAR_TEXT); infobar_txt->setColorBody(COL_INFOBAR_PLUS_0); infobar_txt->doPaintTextBoxBg(false); diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index cfcb9404d..7dd0cc7e4 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -63,7 +63,6 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */ extern cVideo * videoDecoder; //#define SHOW_RADIOTEXT_ICON -#define COL_INFOBAR_BUTTONS (COL_INFOBAR_SHADOW + 1) #define COL_INFOBAR_BUTTONS_BACKGROUND (COL_INFOBAR_SHADOW_PLUS_1) CInfoViewerBB::CInfoViewerBB() @@ -387,7 +386,7 @@ void CInfoViewerBB::showBBButtons(const int modus) frameBuffer->paintIcon(bbButtonInfo[i].icon, bbButtonInfo[i].x, BBarY, InfoHeightY_Info); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(bbButtonInfo[i].x + bbButtonInfo[i].cx, BBarFontY, - bbButtonInfo[i].w - bbButtonInfo[i].cx, bbButtonInfo[i].text, COL_INFOBAR_BUTTONS, 0, true); // UTF-8 + bbButtonInfo[i].w - bbButtonInfo[i].cx, bbButtonInfo[i].text, COL_INFOBAR_TEXT, 0, true); // UTF-8 } } diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index 012d3430b..8a6750c94 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -503,13 +503,13 @@ void CMotorControl::paintLine(int px, int *py, int pwidth, const char *txt) { *py += mheight; frameBuffer->paintBoxRel(px, *py - mheight, pwidth, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, *py, pwidth, txt, COL_MENUCONTENT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, *py, pwidth, txt, COL_MENUCONTENT_TEXT, 0, true); } void CMotorControl::paintLine(int px, int py, int pwidth, const char *txt) { //frameBuffer->paintBoxRel(px, py - mheight, pwidth, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py, pwidth, txt, COL_MENUCONTENT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py, pwidth, txt, COL_MENUCONTENT_TEXT, 0, true); } void CMotorControl::paintSeparator(int xpos, int *pypos, int pwidth, const char * /*txt*/) @@ -527,7 +527,7 @@ void CMotorControl::paintSeparator(int xpos, int *pypos, int pwidth, const char stringstartposX = 0; stringstartposX = (xpos + (pwidth >> 1)) - (stringwidth >> 1); frameBuffer->paintBoxRel(stringstartposX - 5, *pypos - mheight, stringwidth + 10, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, *pypos, stringwidth, txt, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, *pypos, stringwidth, txt, COL_MENUCONTENT_TEXT); #endif } @@ -744,7 +744,7 @@ void CMotorControl::showSNR() posx_sig += barwidth + 3; frameBuffer->paintBoxRel(posx_sig, posy - 2, sw+4, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx_sig+2, posy + mheight, sw, percent, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx_sig+2, posy + mheight, sw, percent, COL_MENUCONTENT_TEXT); } if (lastsnr != snr) { @@ -758,6 +758,6 @@ void CMotorControl::showSNR() posx_snr += barwidth + 3; frameBuffer->paintBoxRel(posx_snr, posy - 2, sw+4, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx_snr+2, posy + mheight, sw, percent, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx_snr+2, posy + mheight, sw, percent, COL_MENUCONTENT_TEXT); } } diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 76c40a3a3..c00b79c94 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -138,7 +138,7 @@ const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_ }; #define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0) -#define TITLE_FONT_COLOR ((CFBWindow::color_t)COL_MENUHEAD) +#define TITLE_FONT_COLOR COL_MENUHEAD_TEXT #define TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] #define FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL] @@ -1638,7 +1638,7 @@ void CMovieBrowser::refreshTitle(void) void CMovieBrowser::refreshFoot(void) { //TRACE("[mb]->refreshButtonLine \r\n"); - int color = (CFBWindow::color_t) COL_INFOBAR_SHADOW; + fb_pixel_t color = COL_INFOBAR_TEXT; int iw = 0, ih = 0; std::string filter_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_FILTER); @@ -3799,16 +3799,16 @@ int CMenuSelector::paint(bool selected) { CFrameBuffer * frameBuffer = CFrameBuffer::getInstance(); - unsigned char color = COL_MENUCONTENT; + fb_pixel_t color = COL_MENUCONTENT_TEXT; fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0; if (selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } if (!active) { - color = COL_MENUCONTENTINACTIVE; + color = COL_MENUCONTENTINACTIVE_TEXT; bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0; } diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 54f3816bd..aaa89fbfb 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1454,7 +1454,7 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data) frameBuffer->paintBoxRel(min_x, min_y, max_x - min_x, max_y-min_y, COL_MENUCONTENT_PLUS_0); for (unsigned i = 0; i < subtext.size(); i++) - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x[i], y[i], sw, subtext[i].c_str(), COL_MENUCONTENT, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x[i], y[i], sw, subtext[i].c_str(), COL_MENUCONTENT_TEXT, 0, true); end_time = sub->end_display_time + time_monotonic_ms(); } diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 35175ea09..cc7ddafd4 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -162,8 +162,8 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); //get footerHeight from paintButtons - buttons1Height = ::paintButtons(0, 0, 0, PictureViewerButtons1Count, PictureViewerButtons1, 0, 0, "", false, COL_INFOBAR_SHADOW, NULL, 0, false); - buttons2Height = ::paintButtons(0, 0, 0, PictureViewerButtons2Count, PictureViewerButtons2, 0, 0, "", false, COL_INFOBAR_SHADOW, NULL, 0, false); + buttons1Height = ::paintButtons(0, 0, 0, PictureViewerButtons1Count, PictureViewerButtons1, 0, 0, "", false, COL_INFOBAR_SHADOW_TEXT, NULL, 0, false); + buttons2Height = ::paintButtons(0, 0, 0, PictureViewerButtons2Count, PictureViewerButtons2, 0, 0, "", false, COL_INFOBAR_SHADOW_TEXT, NULL, 0, false); footerHeight = buttons1Height + buttons2Height; listmaxshow = (height-theight-footerHeight)/(fheight); @@ -660,24 +660,24 @@ void CPictureViewerGui::paintItem(int pos) // printf("paintItem{\n"); int ypos = y+ theight + 0 + pos*fheight; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if ((liststart+pos < playlist.size()) && (pos & 1) ) { - color = COL_MENUCONTENTDARK; + color = COL_MENUCONTENTDARK_TEXT; bgcolor = COL_MENUCONTENTDARK_PLUS_0; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } if (liststart+pos == selected) { frameBuffer->paintBoxRel(x,ypos, width-15, fheight, bgcolor); - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } diff --git a/src/gui/pipsetup.cpp b/src/gui/pipsetup.cpp index 505576479..98692ad7a 100644 --- a/src/gui/pipsetup.cpp +++ b/src/gui/pipsetup.cpp @@ -188,10 +188,10 @@ void CPipSetup::paint() frameBuffer->paintBoxRel(x, y, mwidth, mheight*4, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight, mwidth, xpos, COL_MENUCONTENT); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight*2, mwidth, ypos, COL_MENUCONTENT); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight*3, mwidth, wpos, COL_MENUCONTENT); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight*4, mwidth, hpos, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight, mwidth, xpos, COL_MENUCONTENT_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight*2, mwidth, ypos, COL_MENUCONTENT_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight*3, mwidth, wpos, COL_MENUCONTENT_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight*4, mwidth, hpos, COL_MENUCONTENT_TEXT); } #endif //#ifdef ENABLE_PIP diff --git a/src/gui/pluginlist.cpp b/src/gui/pluginlist.cpp index c74ab285e..470e40ab5 100644 --- a/src/gui/pluginlist.cpp +++ b/src/gui/pluginlist.cpp @@ -266,12 +266,12 @@ void CPluginList::paintItem(int pos) int ypos = (y+theight) + pos*fheight; int itemheight = fheight; - uint8_t color = COL_MENUCONTENT; + fb_pixel_t color = COL_MENUCONTENT_TEXT; fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0; if (liststart+pos==selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 9387449b8..c3a4fd2a6 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -487,7 +487,7 @@ void CScanTs::hide() void CScanTs::paintLineLocale(int px, int * py, int pwidth, const neutrino_locale_t l) { frameBuffer->paintBoxRel(px, *py, pwidth, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, *py + mheight, pwidth, g_Locale->getText(l), COL_MENUCONTENTINACTIVE, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, *py + mheight, pwidth, g_Locale->getText(l), COL_MENUCONTENTINACTIVE_TEXT, 0, true); // UTF-8 *py += mheight; } @@ -495,7 +495,7 @@ void CScanTs::paintLine(int px, int py, int w, const char * const txt) { //printf("CScanTs::paintLine x %d y %d w %d width %d xpos2 %d: %s\n", px, py, w, width, xpos2, txt); frameBuffer->paintBoxRel(px, py, w, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py + mheight, w, txt, COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py + mheight, w, txt, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } void CScanTs::paint(bool fortest) @@ -584,10 +584,10 @@ void CScanTs::showSNR () posx = posx + barwidth + 3; frameBuffer->paintBoxRel(posx, posy -1, sw, mheight-8, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENTDARK); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENTDARK_TEXT); frameBuffer->paintBoxRel(posx+(4*fw), posy - 2, 4*fw, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2+(4*fw), posy + mheight-(mheight-BAR_HEIGHT)/4, 4*fw, "SIG", COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2+(4*fw), posy + mheight-(mheight-BAR_HEIGHT)/4, 4*fw, "SIG", COL_MENUCONTENT_TEXT); } if (lastsnr != snr) { @@ -600,10 +600,10 @@ void CScanTs::showSNR () posx = posx + barwidth + 3; frameBuffer->paintBoxRel(posx, posy - 1, sw, mheight-8, COL_MENUCONTENT_PLUS_0, 0, true); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx + 2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENTDARK, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx + 2, posy + mheight-(mheight-BAR_HEIGHT)/4, sw, percent, COL_MENUCONTENTDARK_TEXT, 0, true); frameBuffer->paintBoxRel(posx+(4*fw), posy - 2, 4*fw, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2+(4*fw), posy + mheight-(mheight-BAR_HEIGHT)/4, 4*fw, "SNR", COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString (posx+2+(4*fw), posy + mheight-(mheight-BAR_HEIGHT)/4, 4*fw, "SNR", COL_MENUCONTENT_TEXT); } } diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index fd51c7def..b1662e478 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -259,9 +259,9 @@ void CScreenSetup::paintIcons(int pselected) frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x_box + 5, y_box+BoxHeight, BoxHeight); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + icol_w + 10, y_box + BoxHeight, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_UPPERLEFT ), (pselected == 0) ? COL_MENUCONTENTSELECTED:COL_MENUCONTENT , 0, true); // UTF-8 + g_Locale->getText(LOCALE_SCREENSETUP_UPPERLEFT ), (pselected == 0) ? COL_MENUCONTENTSELECTED_TEXT:COL_MENUCONTENT_TEXT , 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + icol_w + 10, y_box + BoxHeight * 2, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_LOWERRIGHT), (pselected == 1) ? COL_MENUCONTENTSELECTED:COL_MENUCONTENT, 0, true); // UTF-8 + g_Locale->getText(LOCALE_SCREENSETUP_LOWERRIGHT), (pselected == 1) ? COL_MENUCONTENTSELECTED_TEXT:COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } void CScreenSetup::paintBorderUL() @@ -296,7 +296,7 @@ void CScreenSetup::paintCoords() /* the code is smaller with this loop instead of open-coded 4x RenderString() :-) */ for (int i = 0; i < 4; i++) { - f->RenderString(x2, y2, w, str[i], COL_MENUCONTENT); + f->RenderString(x2, y2, w, str[i], COL_MENUCONTENT_TEXT); y2 += fh; } } diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 5304134a8..7def6b751 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -175,12 +175,12 @@ int CStreamInfo2::doSignalStrengthLoop () rate.min_short_average = minb = bit_s; sprintf(tmp_str, "%s:",g_Locale->getText(LOCALE_STREAMINFO_BITRATE)); - g_Font[font_info]->RenderString(dx1 , average_bitrate_pos, offset+10, tmp_str, COL_INFOBAR, 0, true); + g_Font[font_info]->RenderString(dx1 , average_bitrate_pos, offset+10, tmp_str, COL_INFOBAR_TEXT, 0, true); sprintf(currate, "%5llu.%02llu", rate.short_average / 1000ULL, rate.short_average % 1000ULL); frameBuffer->paintBoxRel (dx1 + average_bitrate_offset , average_bitrate_pos -dheight, sw, dheight, COL_MENUHEAD_PLUS_0); - g_Font[font_info]->RenderString (dx1 + average_bitrate_offset , average_bitrate_pos, sw - 10, currate, COL_INFOBAR); + g_Font[font_info]->RenderString (dx1 + average_bitrate_offset , average_bitrate_pos, sw - 10, currate, COL_INFOBAR_TEXT); sprintf(tmp_str, "(%s)",g_Locale->getText(LOCALE_STREAMINFO_AVERAGE_BITRATE)); - g_Font[font_info]->RenderString (dx1 + average_bitrate_offset + sw , average_bitrate_pos, sw *2, tmp_str, COL_INFOBAR); + g_Font[font_info]->RenderString (dx1 + average_bitrate_offset + sw , average_bitrate_pos, sw *2, tmp_str, COL_INFOBAR_TEXT); } showSNR (); @@ -270,7 +270,7 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) char tname[255]; snprintf(tname, sizeof(tname), "%s: %d: %s", g_Locale->getText(LOCALE_STREAMINFO_SIGNAL), tuner, frontend->getInfo()->name); - g_Font[font_small]->RenderString(_x, _y+iheight+15, width-10, tname /*tuner_name.c_str()*/, COL_INFOBAR, 0, true); + g_Font[font_small]->RenderString(_x, _y+iheight+15, width-10, tname /*tuner_name.c_str()*/, COL_INFOBAR_TEXT, 0, true); sigBox_x = _x; sigBox_y = _y+iheight+15; @@ -283,16 +283,16 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) frameBuffer->paintBoxRel(_x+xd*0,y1- 12,16,2, COL_RED); //red - g_Font[font_small]->RenderString(_x+20+xd*0, y1, fw*4, "BER", COL_INFOBAR, 0, true); + g_Font[font_small]->RenderString(_x+20+xd*0, y1, fw*4, "BER", COL_INFOBAR_TEXT, 0, true); frameBuffer->paintBoxRel(_x+xd*1,y1- 12,16,2,COL_BLUE); //blue - g_Font[font_small]->RenderString(_x+20+xd*1, y1, fw*4, "SNR", COL_INFOBAR, 0, true); + g_Font[font_small]->RenderString(_x+20+xd*1, y1, fw*4, "SNR", COL_INFOBAR_TEXT, 0, true); frameBuffer->paintBoxRel(_x+8+xd*2,y1- 12,16,2, COL_GREEN); //green - g_Font[font_small]->RenderString(_x+28+xd*2, y1, fw*4, "SIG", COL_INFOBAR, 0, true); + g_Font[font_small]->RenderString(_x+28+xd*2, y1, fw*4, "SIG", COL_INFOBAR_TEXT, 0, true); frameBuffer->paintBoxRel(_x+xd*3,y1- 12,16,2,COL_YELLOW); // near yellow - g_Font[font_small]->RenderString(_x+20+xd*3, y1, fw*5, "Bitrate", COL_INFOBAR, 0, true); + g_Font[font_small]->RenderString(_x+20+xd*3, y1, fw*5, "Bitrate", COL_INFOBAR_TEXT, 0, true); sig_text_ber_x = _x + xd * 0; sig_text_snr_x = _x + 5 + xd * 1; @@ -307,9 +307,9 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) else maxmin_x = _x + 40 + xd * 3 + (fontW*4); - g_Font[font_small]->RenderString(maxmin_x, y1 + sheight + 5, fw*3, "max", COL_INFOBAR, 0, true); - g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 2) +5, fw*3, "now", COL_INFOBAR, 0, true); - g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 3) +5, fw*3, "min", COL_INFOBAR, 0, true); + g_Font[font_small]->RenderString(maxmin_x, y1 + sheight + 5, fw*3, "max", COL_INFOBAR_TEXT, 0, true); + g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 2) +5, fw*3, "now", COL_INFOBAR_TEXT, 0, true); + g_Font[font_small]->RenderString(maxmin_x, y1 + (sheight * 3) +5, fw*3, "min", COL_INFOBAR_TEXT, 0, true); sigBox_pos = 0; @@ -399,7 +399,7 @@ void CStreamInfo2::SignalRenderStr(unsigned int value, int _x, int _y) fw *=(fw>17)?5:6; frameBuffer->paintBoxRel(_x, _y - sheight + 5, fw, sheight -1, COL_MENUHEAD_PLUS_0); sprintf(str,"%6u",value); - g_Font[font_small]->RenderString(_x, _y + 5, fw, str, COL_INFOBAR, 0, true); + g_Font[font_small]->RenderString(_x, _y + 5, fw, str, COL_INFOBAR_TEXT, 0, true); } void CStreamInfo2::paint (int /*mode*/) @@ -420,7 +420,7 @@ void CStreamInfo2::paint (int /*mode*/) // paint backround, title pig, etc. frameBuffer->paintBoxRel (0, 0, max_width, max_height, COL_MENUHEAD_PLUS_0); - g_Font[font_head]->RenderString (xpos, ypos + hheight + 1, width, head_string, COL_MENUHEAD, 0, true); // UTF-8 + g_Font[font_head]->RenderString (xpos, ypos + hheight + 1, width, head_string, COL_MENUHEAD_TEXT, 0, true); // UTF-8 ypos += hheight; if (pip == NULL) @@ -482,14 +482,14 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) //Video RESOLUTION ypos += iheight; sprintf (buf, "%s:",g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION)); - g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 sprintf (buf, "%dx%d", xres, yres); - g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //audio rate ypos += iheight; sprintf (buf, "%s:",g_Locale->getText (LOCALE_STREAMINFO_ARATIO)); - g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 switch (aspectRatio) { case 0: sprintf (buf, "N/A"); @@ -509,12 +509,12 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) default: strncpy (buf, g_Locale->getText (LOCALE_STREAMINFO_ARATIO_UNKNOWN), sizeof (buf)-1); } - g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //Video FRAMERATE ypos += iheight; sprintf (buf, "%s:", g_Locale->getText (LOCALE_STREAMINFO_FRAMERATE)); - g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 switch (framerate) { case 0: snprintf (buf,sizeof(buf), "23.976fps"); @@ -544,7 +544,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) strncpy (buf, g_Locale->getText (LOCALE_STREAMINFO_FRAMERATE_UNKNOWN), sizeof (buf)-1); break; } - g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 // place for average bitrate average_bitrate_pos = ypos += iheight; //AUDIOTYPE @@ -556,14 +556,14 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) const char *ddmodes[8] = { "CH1/CH2", "C", "L/R", "L/C/R", "L/R/S", "L/C/R/S", "L/R/SL/SR", "L/C/R/SL/SR" }; sprintf (buf, "%s:", g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE)); - g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 if(type == 0) { sprintf (buf, "MPEG %s (%d)", mpegmodes[mode], freq); } else { sprintf (buf, "DD %s (%d)", ddmodes[mode], freq); } - g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //satellite ypos += iheight; @@ -572,18 +572,18 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) else if(t.deltype == FE_QAM) sprintf (buf, "%s:",g_Locale->getText (LOCALE_CHANNELLIST_PROVS)); - g_Font[font_info]->RenderString(xpos, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString(xpos, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 sprintf (buf, "%s", CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()).c_str()); - g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //channel ypos += iheight; sprintf (buf, "%s:",g_Locale->getText (LOCALE_TIMERLIST_CHANNEL));//swiped locale - g_Font[font_info]->RenderString(xpos, ypos, box_width, buf , COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString(xpos, ypos, box_width, buf , COL_INFOBAR_TEXT, 0, true); // UTF-8 sprintf(buf, "%s", channel->getName().c_str()); - g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //tsfrequenz ypos += iheight; @@ -593,8 +593,8 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) scaling = 15000; sprintf (buf, "%s",g_Locale->getText (LOCALE_SCANTS_FREQDATA)); - g_Font[font_info]->RenderString(xpos, ypos, box_width, buf , COL_INFOBAR, 0, true); // UTF-8 - g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, box_width, t.description().c_str(), COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_info]->RenderString(xpos, ypos, box_width, buf , COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, box_width, t.description().c_str(), COL_INFOBAR_TEXT, 0, true); // UTF-8 // paint labels int fontW = g_Font[font_small]->getWidth(); @@ -602,27 +602,27 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) //onid ypos+= sheight; sprintf(buf, "0x%04X (%i)", channel->getOriginalNetworkId(), channel->getOriginalNetworkId()); - g_Font[font_small]->RenderString(xpos, ypos, box_width, "ONid:" , COL_INFOBAR, 0, true); // UTF-8 - g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos, ypos, box_width, "ONid:" , COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //sid ypos+= sheight; sprintf(buf, "0x%04X (%i)", channel->getServiceId(), channel->getServiceId()); - g_Font[font_small]->RenderString(xpos, ypos, box_width, "Sid:" , COL_INFOBAR, 0, true); // UTF-8 - g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos, ypos, box_width, "Sid:" , COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //tsid ypos+= sheight; sprintf(buf, "0x%04X (%i)", channel->getTransportStreamId(), channel->getTransportStreamId()); - g_Font[font_small]->RenderString(xpos, ypos, box_width, "TSid:" , COL_INFOBAR, 0, true); // UTF-8 - g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos, ypos, box_width, "TSid:" , COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //pmtpid ypos+= sheight; pmt_version = channel->getPmtVersion(); sprintf(buf, "0x%04X (%i) [0x%02X]", channel->getPmtPid(), channel->getPmtPid(), pmt_version); - g_Font[font_small]->RenderString(xpos, ypos, box_width, "PMTpid:", COL_INFOBAR, 0, true); // UTF-8 - g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos, ypos, box_width, "PMTpid:", COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //vpid ypos+= sheight; @@ -631,12 +631,12 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) } else { sprintf(buf, "%s", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE)); } - g_Font[font_small]->RenderString(xpos, ypos, box_width, "Vpid:" , COL_INFOBAR, 0, true); // UTF-8 - g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos, ypos, box_width, "Vpid:" , COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 //apid ypos+= sheight; - g_Font[font_small]->RenderString(xpos, ypos, box_width, "Apid(s):" , COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos, ypos, box_width, "Apid(s):" , COL_INFOBAR_TEXT, 0, true); // UTF-8 if (g_RemoteControl->current_PIDs.APIDs.empty()){ sprintf(buf, "%s", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE)); } else { @@ -645,10 +645,10 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) { sprintf(buf, "0x%04X (%i)", g_RemoteControl->current_PIDs.APIDs[li].pid, g_RemoteControl->current_PIDs.APIDs[li].pid ); if (li == g_RemoteControl->current_PIDs.PIDs.selected_apid){ - g_Font[font_small]->RenderString(xpos+sw, ypos, box_width, buf, COL_MENUHEAD, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+sw, ypos, box_width, buf, COL_MENUHEAD_TEXT, 0, true); // UTF-8 } else{ - g_Font[font_small]->RenderString(xpos+sw, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+sw, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 } sw = g_Font[font_small]->getRenderWidth(buf)+sw+10; if (((li+1)%3 == 0) &&(g_RemoteControl->current_PIDs.APIDs.size()-1 > li)){ // if we have lots of apids, put "intermediate" line with pids @@ -664,8 +664,8 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) sprintf(buf, "%s", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE)); else sprintf(buf, "0x%04X (%i)", g_RemoteControl->current_PIDs.PIDs.vtxtpid, g_RemoteControl->current_PIDs.PIDs.vtxtpid ); - g_Font[font_small]->RenderString(xpos, ypos, box_width, "VTXTpid:" , COL_INFOBAR, 0, true); // UTF-8 - g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos, ypos, box_width, "VTXTpid:" , COL_INFOBAR_TEXT, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR_TEXT, 0, true); // UTF-8 if(box_h == 0) box_h = ypos - ypos1; yypos = ypos; @@ -753,7 +753,7 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos) if(caids[ca_id] == true){ if(cryptsysteme){ ypos += iheight; - g_Font[font_info]->RenderString(xpos , ypos, box_width, "Conditional access:" , COL_INFOBAR, 0, false); + g_Font[font_info]->RenderString(xpos , ypos, box_width, "Conditional access:" , COL_INFOBAR_TEXT, 0, false); cryptsysteme = false; } ypos += sheight; @@ -762,7 +762,7 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos) std::string::size_type last_pos = casys[ca_id].find_first_not_of(tok, 0); std::string::size_type pos = casys[ca_id].find_first_of(tok, last_pos); while (std::string::npos != pos || std::string::npos != last_pos){ - g_Font[font_small]->RenderString(xpos + width_txt, ypos, box_width, casys[ca_id].substr(last_pos, pos - last_pos).c_str() , COL_INFOBAR, 0, false); + g_Font[font_small]->RenderString(xpos + width_txt, ypos, box_width, casys[ca_id].substr(last_pos, pos - last_pos).c_str() , COL_INFOBAR_TEXT, 0, false); if(index == 0) width_txt = spaceoffset; else diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 48d32aea0..6b0cd6488 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -98,10 +98,10 @@ void CTimeOSD::update(time_t time_show) if(m_mode == MODE_ASC) { color1 = COL_MENUCONTENT_PLUS_0; - color2 = COL_MENUCONTENT; + color2 = COL_MENUCONTENT_TEXT; } else { color1 = COL_MENUCONTENTSELECTED_PLUS_0; - color2 = COL_MENUCONTENTSELECTED; + color2 = COL_MENUCONTENTSELECTED_TEXT; } strftime(cDisplayTime, 9, "%T", gmtime(&time_show)); frameBuffer->paintBoxRel(m_xend - m_width - t1, m_y, m_width, m_height, color1,RADIUS_SMALL); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 0b3d3dd97..c5fa8e6f9 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -438,7 +438,7 @@ void CTimerList::updateEvents(void) theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); //get footerHeight from paintButtons - footerHeight = ::paintButtons(0, 0, 0, TimerListButtonsCount, TimerListButtons, 0, 0, "", false, COL_INFOBAR_SHADOW, NULL, 0, false); + footerHeight = ::paintButtons(0, 0, 0, TimerListButtonsCount, TimerListButtons, 0, 0, "", false, COL_INFOBAR_SHADOW_TEXT, NULL, 0, false); width = w_max(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth()*56, 20); height = frameBuffer->getScreenHeight() - (2*theight); // max height @@ -687,7 +687,7 @@ void CTimerList::paintItem(int pos) { int ypos = y+ theight+ pos*fheight*2; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; int real_width=width; @@ -696,7 +696,7 @@ void CTimerList::paintItem(int pos) real_width-=15; //scrollbar } - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; if (pos & 1) bgcolor = COL_MENUCONTENT_PLUS_1; else @@ -708,7 +708,7 @@ void CTimerList::paintItem(int pos) if (liststart + pos == selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } //selected item diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 29bfe8161..48ed0808c 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -870,17 +870,17 @@ bool CUpnpBrowserGui::selectItem(std::string id) void CUpnpBrowserGui::paintDevicePos(unsigned int pos) { int ypos = m_y + m_title_height + m_theight + pos*m_fheight; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if (pos == m_selecteddevice) { - color = COL_MENUCONTENT + 2; + color = COL_MENUCONTENT_TEXT_PLUS_2; bgcolor = COL_MENUCONTENT_PLUS_2; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } m_frameBuffer->paintBoxRel(m_x, ypos, m_width - 15, m_fheight, bgcolor); @@ -906,12 +906,12 @@ void CUpnpBrowserGui::paintDevicePos(unsigned int pos) void CUpnpBrowserGui::paintItemPos(std::vector *entry, unsigned int pos, unsigned int selected) { int ypos = m_y + m_title_height + m_theight + pos*m_fheight; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if (pos == selected) { - color = COL_MENUCONTENT + 2; + color = COL_MENUCONTENT_TEXT_PLUS_2; bgcolor = COL_MENUCONTENT_PLUS_2; paintDetails(entry, pos); if ((*entry)[pos].isdir) @@ -921,7 +921,7 @@ void CUpnpBrowserGui::paintItemPos(std::vector *entry, unsigned int p } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } m_frameBuffer->paintBoxRel(m_x, ypos, m_width - 15, m_fheight, bgcolor); @@ -987,7 +987,7 @@ void CUpnpBrowserGui::paintDevice() if (xstart < 10) xstart = 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 1*m_mheight, m_width - 20, - tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // second line tmp = m_devices[m_selecteddevice].modelname + " " + @@ -998,7 +998,7 @@ void CUpnpBrowserGui::paintDevice() if (xstart < 10) xstart = 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 2*m_mheight, m_width - 20, - tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // third line tmp = m_devices[m_selecteddevice].modelurl; w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp, true); // UTF-8 @@ -1006,7 +1006,7 @@ void CUpnpBrowserGui::paintDevice() if (xstart < 10) xstart = 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 3*m_mheight, m_width - 20, - tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // Head CComponentsHeader header(m_x, m_y + m_title_height, m_width, m_theight, LOCALE_UPNPBROWSER_HEAD, NEUTRINO_ICON_UPNP, CComponentsHeader::CC_BTN_MENU); @@ -1070,7 +1070,7 @@ void CUpnpBrowserGui::paintItem(std::vector *entry, unsigned int sele if (xstart < 10) xstart = 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 1*m_mheight, m_width - 20, - tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // second line if ((*entry)[selected].isdir) @@ -1093,7 +1093,7 @@ void CUpnpBrowserGui::paintItem(std::vector *entry, unsigned int sele if (xstart < 10) xstart = 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 2*m_mheight, m_width - 20, - tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 //third line tmp = ""; @@ -1112,7 +1112,7 @@ void CUpnpBrowserGui::paintItem(std::vector *entry, unsigned int sele if (xstart < 10) xstart = 10; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 3*m_mheight, m_width - 20, - tmp, COL_MENUCONTENTSELECTED, 0, true); // UTF-8 + tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 // Head @@ -1120,7 +1120,7 @@ void CUpnpBrowserGui::paintItem(std::vector *entry, unsigned int sele m_frameBuffer->paintBoxRel(m_x, m_y + m_title_height, m_width, m_theight, COL_MENUHEAD_PLUS_0); m_frameBuffer->paintIcon(NEUTRINO_ICON_UPNP, m_x + 7, m_y + m_title_height + 6); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(m_x + 35, m_y + m_theight + m_title_height + 0, - m_width - 45, tmp, COL_MENUHEAD, 0, true); // UTF-8 + m_width - 45, tmp, COL_MENUHEAD_TEXT, 0, true); // UTF-8 ypos = m_y + m_title_height; if (m_theight > 26) ypos = (m_theight - 26) / 2 + m_y + m_title_height; @@ -1184,9 +1184,9 @@ void CUpnpBrowserGui::paintDetails(std::vector *entry, unsigned int i m_playing_entry_is_shown = true; g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(text_start, top + 1 * m_buttonHeight + 4, m_x + m_width - 8, m_playing_entry.title + " - " + - m_playing_entry.artist, COL_MENUCONTENTDARK, 0, true); // UTF-8 + m_playing_entry.artist, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(text_start, - top + 2 * m_buttonHeight + 4, m_x + m_width - 8, m_playing_entry.album, COL_MENUCONTENTDARK, 0, true); // UTF-8 + top + 2 * m_buttonHeight + 4, m_x + m_width - 8, m_playing_entry.album, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 } } else @@ -1195,9 +1195,9 @@ void CUpnpBrowserGui::paintDetails(std::vector *entry, unsigned int i m_playing_entry_is_shown = false; g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(text_start, top + 1 * m_buttonHeight + 4, m_x + m_width - 8, (*entry)[index].title + " - " + - (*entry)[index].artist, COL_MENUCONTENTDARK, 0, true); // UTF-8 + (*entry)[index].artist, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->RenderString(text_start, - top + 2 * m_buttonHeight + 4, m_x + m_width - 8, (*entry)[index].album, COL_MENUCONTENTDARK, 0, true); // UTF-8 + top + 2 * m_buttonHeight + 4, m_x + m_width - 8, (*entry)[index].album, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 } //// printf("title = %s\n", (*entry)[selected].title.c_str()); // printf("artist = %s\n", (*entry)[selected].artist.c_str()); @@ -1236,7 +1236,7 @@ void CUpnpBrowserGui::paintDetails(std::vector *entry, unsigned int i text3 += " . "; xstart += g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text3); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2* fheight, width - 30- noch_len, text3, COL_MENUCONTENTDARK); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2* fheight, width - 30- noch_len, text3, COL_MENUCONTENTDARK_TEXT); } if (!(text2.empty())) @@ -1244,12 +1244,12 @@ void CUpnpBrowserGui::paintDetails(std::vector *entry, unsigned int i while ( text2.find_first_of("[ -.+*#?=!$%&/]+") == 0 ) text2 = text2.substr( 1 ); text2 = text2.substr( 0, text2.find('\n') ); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ 2* fheight, width- xstart- 20- noch_len, text2, COL_MENUCONTENTDARK); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ xstart, y+ height+ 5+ 2* fheight, width- xstart- 20- noch_len, text2, COL_MENUCONTENTDARK_TEXT); } - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30 - seit_len, text1, COL_MENUCONTENTDARK); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString (x+ width- 10- seit_len, y+ height+ 5+ fheight , seit_len, cSeit, COL_MENUCONTENTDARK, 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x+ width- 10- noch_len, y+ height+ 5+ 2* fheight- 2, noch_len, cNoch, COL_MENUCONTENTDARK, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ fheight, width - 30 - seit_len, text1, COL_MENUCONTENTDARK_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString (x+ width- 10- seit_len, y+ height+ 5+ fheight , seit_len, cSeit, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x+ width- 10- noch_len, y+ height+ 5+ 2* fheight- 2, noch_len, cNoch, COL_MENUCONTENTDARK_TEXT, 0, true); // UTF-8 #endif } @@ -1339,7 +1339,7 @@ void CUpnpBrowserGui::updateTimes(const bool force) paintDetails(NULL, 0, true); top = m_y + (m_height - m_info_height - 1 * m_buttonHeight) + m_buttonHeight + 4; m_frameBuffer->paintBoxRel(m_x + m_width - w - 15, top + 1, w + 4, m_buttonHeight, COL_MENUCONTENTDARK_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(m_x + m_width - w - 11, top + 1 + m_buttonHeight, w, play_time, COL_MENUCONTENTDARK); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(m_x + m_width - w - 11, top + 1 + m_buttonHeight, w, play_time, COL_MENUCONTENTDARK_TEXT); } } } diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 6330ef150..b2287efb2 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -209,7 +209,7 @@ void CVolumeBar::initVolumeBarDigit() vb_digit = new CComponentsLabel(); vb_digit->setDimensionsAll(vb_digit_x, 0, vb_digit_w, height); - vb_digit->setTextColor(COL_MENUCONTENT); + vb_digit->setTextColor(COL_MENUCONTENT_TEXT); vb_digit->setCornerRadius(cornerRad()); vb_digit->setCornerType(CORNER_RIGHT); initVolumeBarDigitValue(); diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index 0a0edfa36..647bcc80b 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -53,7 +53,7 @@ * stuff below here was obviously not tested recently * vertical_paint optional, default value is false (horizontal) sets direction of painted buttons - * fcolor optional, default value is COL_INFOBAR_SHADOW, use it to render font with other color + * fcolor optional, default value is COL_INFOBAR_SHADOW_TEXT, use it to render font with other color * alt_buttontext optional, default NULL, overwrites button caption at definied buttonlabel id (see parameter alt_buttontext_id) with this text * alt_buttontext_id optional, default 0, means id from buttonlable struct which text you will change * show optional, default value is true (show button), if false, then no show and return the height of the button. @@ -68,7 +68,7 @@ int paintButtons( const int &x, const int &footerheight, std::string /* just to make sure nobody uses anything below */, bool vertical_paint, - const unsigned char fcolor, + const uint32_t fcolor, const char * alt_buttontext, const uint &buttontext_id, bool show, diff --git a/src/gui/widget/buttons.h b/src/gui/widget/buttons.h index d4a187ab6..f988dcfae 100644 --- a/src/gui/widget/buttons.h +++ b/src/gui/widget/buttons.h @@ -44,7 +44,7 @@ int paintButtons( const int &x, const int &footerheight = 0, std::string tmp = "", /* just to make sure compilation breaks */ bool vertical_paint = false, - const unsigned char fcolor = COL_INFOBAR_SHADOW, + const uint32_t fcolor = COL_INFOBAR_SHADOW_TEXT, const char * alt_buttontext = NULL, const uint &buttontext_id = 0, bool show = true, diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index d23fff11f..e2e060725 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -246,7 +246,7 @@ void CColorChooser::paint() { //frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0); frameBuffer->paintBoxRel(x,y, width,hheight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP); //round - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+hheight, width, g_Locale->getText(name), COL_MENUHEAD_TEXT, 0, true); // UTF-8 //frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x,y+hheight, width,height-hheight, COL_MENUCONTENT_PLUS_0, RADIUS_MID, CORNER_BOTTOM);//round @@ -266,5 +266,5 @@ void CColorChooser::paintSlider(int px, int py, unsigned char *spos, const neutr frameBuffer->paintIcon(NEUTRINO_ICON_VOLUMEBODY,px+offset+10,py+2+mheight/4); frameBuffer->paintIcon(selected ? iconname : NEUTRINO_ICON_VOLUMESLIDER2,px+offset+13+(*spos),py+mheight/4); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px,py+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px,py+mheight, width, g_Locale->getText(text), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } diff --git a/src/gui/widget/drawable.cpp b/src/gui/widget/drawable.cpp index bfb41c807..7435d9158 100644 --- a/src/gui/widget/drawable.cpp +++ b/src/gui/widget/drawable.cpp @@ -88,7 +88,7 @@ void DText::init() void DText::draw(CFBWindow *window, int x, int y, int width) { window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], x, y + m_height, width, - m_text.c_str(), (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8 + m_text.c_str(), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } void DText::print(void) @@ -136,7 +136,7 @@ void DPagebreak::draw(CFBWindow */*window*/, int /*x*/, int /*y*/, int /*width*/ { // window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], // x, y + m_height, width, "", -// (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8 +// COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } void DPagebreak::print(void) diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index f195f2deb..3c9828678 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -189,11 +189,11 @@ void CHintBox::refresh(void) CFrameBuffer::getInstance()->getIconSize(iconfile.c_str(), &iw, &ih); //window->paintIcon(iconfile.c_str(), 8, 5); window->paintIcon(iconfile.c_str(), 10, 0, theight); - //window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iw+20, theight, width - 20-iw, g_Locale->getText(caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 - window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iw+20, theight, width - 20-iw, caption, (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 + //window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iw+20, theight, width - 20-iw, g_Locale->getText(caption), COL_MENUHEAD_TEXT, 0, true); // UTF-8 + window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iw+20, theight, width - 20-iw, caption, COL_MENUHEAD_TEXT, 0, true); // UTF-8 } else - window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], 10, theight, width - 10, caption, (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 + window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], 10, theight, width - 10, caption, COL_MENUHEAD_TEXT, 0, true); // UTF-8 //window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0); window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);//round @@ -202,7 +202,7 @@ void CHintBox::refresh(void) int ypos = theight + (fheight >> 1); for (std::vector::const_iterator it = line.begin() + (entries_per_page * current_page); ((it != line.end()) && (count > 0)); ++it, count--) - window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], textStartX, (ypos += fheight), width, *it, (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8 + window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], textStartX, (ypos += fheight), width, *it, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 if (entries_per_page < line.size()) { diff --git a/src/gui/widget/hintboxext.cpp b/src/gui/widget/hintboxext.cpp index 8684e6899..040e525f9 100644 --- a/src/gui/widget/hintboxext.cpp +++ b/src/gui/widget/hintboxext.cpp @@ -257,7 +257,7 @@ void CHintBoxExt::refresh(bool toround) x_text = x_offset; // title text - m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], x_text, m_theight, m_width, title_text.c_str(), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8 + m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], x_text, m_theight, m_width, title_text.c_str(), COL_MENUHEAD_TEXT, 0, true); // UTF-8 // background of text panel m_window->paintBoxRel(0, m_theight, m_width, (m_maxEntriesPerPage + 1) * m_fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, toround ? RADIUS_LARGE : 0, CORNER_BOTTOM);//round diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index 7518cd60b..41f325273 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -173,9 +173,9 @@ void CKeyChooserItem::paint() frameBuffer->paintBoxRel(x, y , width, hheight , COL_MENUHEAD_PLUS_0 , RADIUS_LARGE, CORNER_TOP);//round frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);//round - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ 10, y+ hheight, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ 10, y+ hheight, width, g_Locale->getText(name), COL_MENUHEAD_TEXT, 0, true); // UTF-8 //paint msg... - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, y+ hheight+ mheight, width, g_Locale->getText(LOCALE_KEYCHOOSER_TEXT1), COL_MENUCONTENT, 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, y+ hheight+ mheight* 2, width, g_Locale->getText(LOCALE_KEYCHOOSER_TEXT2), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, y+ hheight+ mheight, width, g_Locale->getText(LOCALE_KEYCHOOSER_TEXT1), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, y+ hheight+ mheight* 2, width, g_Locale->getText(LOCALE_KEYCHOOSER_TEXT2), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 9e057e72a..57d37cfee 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -83,7 +83,7 @@ void CListBox::paintHead() { //frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0); frameBuffer->paintBoxRel(x, y, width, theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width, caption.c_str() , COL_MENUHEAD, 0, true); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width, caption.c_str() , COL_MENUHEAD_TEXT, 0, true); } void CListBox::paintFoot() @@ -94,16 +94,16 @@ void CListBox::paintFoot() frameBuffer->paintHLine(x, x+width, y, COL_INFOBAR_SHADOW_PLUS_0); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_OKAY, x+width- 4* ButtonWidth+ 8, y+height+1); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 4* ButtonWidth+ 38, y+height+24 - 2, width, "edit", COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 4* ButtonWidth+ 38, y+height+24 - 2, width, "edit", COL_INFOBAR_TEXT); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x+width- 3* ButtonWidth+ 8, y+height+4); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 3* ButtonWidth+ 29, y+height+24 - 2, width- 26, "add", COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 3* ButtonWidth+ 29, y+height+24 - 2, width- 26, "add", COL_INFOBAR_TEXT); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x+width- 2* ButtonWidth+ 8, y+height+4); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 2* ButtonWidth+ 29, y+height+24 - 2, width- 26, "remove", COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width- 2* ButtonWidth+ 29, y+height+24 - 2, width- 26, "remove", COL_INFOBAR_TEXT); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HOME, x+width - ButtonWidth+ 8, y+height+1); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width - ButtonWidth+ 38, y+height+24 - 2, width, "ready", COL_INFOBAR); + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(x+width - ButtonWidth+ 38, y+height+24 - 2, width, "ready", COL_INFOBAR_TEXT); } void CListBox::paintItem(int pos) @@ -130,17 +130,17 @@ void CListBox::paintItem(unsigned int /*itemNr*/, int paintNr, bool pselected) { int ypos = y+ theight + paintNr*getItemHeight(); - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if (pselected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index 437cdd0c9..fe8d979af 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -72,11 +72,11 @@ //#define LIST_BACKGROUND_COLOR_SELECTED ((CFBWindow::color_t)COL_MENUCONTENT_PLUS_1) #define LIST_BACKGROUND_COLOR_SELECTED ((CFBWindow::color_t)COL_MENUCONTENTSELECTED_PLUS_0) -#define TITLE_FONT_COLOR COL_MENUHEAD -#define HEADER_LIST_FONT_COLOR COL_MENUCONTENT -#define LIST_FONT_COLOR COL_MENUCONTENT -//#define LIST_FONT_COLOR_SELECTED COL_MENUCONTENT -#define LIST_FONT_COLOR_SELECTED COL_MENUCONTENTSELECTED +#define TITLE_FONT_COLOR COL_MENUHEAD_TEXT +#define HEADER_LIST_FONT_COLOR COL_MENUCONTENT_TEXT +#define LIST_FONT_COLOR COL_MENUCONTENT_TEXT +//#define LIST_FONT_COLOR_SELECTED COL_MENUCONTENT_TEXT +#define LIST_FONT_COLOR_SELECTED COL_MENUCONTENTSELECTED_TEXT #define FONT_LIST g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2] #define FONT_HEADER_LIST g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1] @@ -418,7 +418,7 @@ void CListFrame::refreshList(void) line < m_nNrOfLines && line < m_nCurrentLine + m_nLinesPerPage; line++) { - int color = LIST_FONT_COLOR; + uint32_t color = LIST_FONT_COLOR; // draw line if(line == m_nSelectedLine && m_showSelection == true) { @@ -461,7 +461,7 @@ void CListFrame::refreshLine(int line) if((line < m_nCurrentLine) && (line > m_nCurrentLine + m_nLinesPerPage)) return; - uint8_t color; + uint32_t color; int rel_line = line - m_nCurrentLine; int y = m_cFrameListRel.iY + TEXT_BORDER_WIDTH + (rel_line*m_nFontListHeight); diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 0fb4a3972..9d3cc6aad 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -74,7 +74,7 @@ void CMenuItem::init(const int X, const int Y, const int DX, const int OFFX) dx = DX; offx = OFFX; name_start_x = x + offx + icon_frame_w; - item_color = COL_MENUCONTENT; + item_color = COL_MENUCONTENT_TEXT; item_bgcolor = COL_MENUCONTENT_PLUS_0; } @@ -100,17 +100,17 @@ void CMenuItem::initItemColors(const bool select_mode) { if (select_mode) { - item_color = COL_MENUCONTENTSELECTED; + item_color = COL_MENUCONTENTSELECTED_TEXT; item_bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else if (!active) { - item_color = COL_MENUCONTENTINACTIVE; + item_color = COL_MENUCONTENTINACTIVE_TEXT; item_bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0; } else { - item_color = COL_MENUCONTENT; + item_color = COL_MENUCONTENT_TEXT; item_bgcolor = COL_MENUCONTENT_PLUS_0; } } @@ -1910,12 +1910,12 @@ int CMenuSeparator::paint(bool selected) if ((type & SUB_HEAD)) { - item_color = COL_MENUHEAD; + item_color = COL_MENUHEAD_TEXT; item_bgcolor = COL_MENUHEAD_PLUS_0; } else { - item_color = COL_MENUCONTENTINACTIVE; + item_color = COL_MENUCONTENTINACTIVE_TEXT; item_bgcolor = COL_MENUCONTENT_PLUS_0; } diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index f70dab35d..747af9503 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -156,10 +156,10 @@ void CMessageBox::paintButtons() for (i = 0; i < ButtonCount; i++) { if (Buttons[i].def) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else { - color = COL_INFOBAR_SHADOW; + color = COL_INFOBAR_SHADOW_TEXT; bgcolor = COL_INFOBAR_SHADOW_PLUS_0; } CFrameBuffer::getInstance()->getIconSize(Buttons[i].icon, &iw, &ih); diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index a4f88ca16..9b8426251 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -328,7 +328,7 @@ void CMsgBox::initFramesRel(void) ////////////////////////////////////////////////////////////////////// void CMsgBox::refreshFoot(void) { - int color,bgcolor; + uint32_t color, bgcolor; if( !(m_nMode & FOOT)) return; // draw the background first @@ -351,12 +351,12 @@ void CMsgBox::refreshFoot(void) { if (m_nResult == mbrYes) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else { - color = COL_INFOBAR_SHADOW; + color = COL_INFOBAR_SHADOW_TEXT; bgcolor = COL_INFOBAR_SHADOW_PLUS_0; } 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); @@ -372,12 +372,12 @@ void CMsgBox::refreshFoot(void) { if (m_nResult == mbrNo) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else { - color = COL_INFOBAR_SHADOW; + color = COL_INFOBAR_SHADOW_TEXT; bgcolor = COL_INFOBAR_SHADOW_PLUS_0; } @@ -394,12 +394,12 @@ void CMsgBox::refreshFoot(void) { if (m_nResult >= mbrCancel) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else { - color = COL_INFOBAR_SHADOW; + color = COL_INFOBAR_SHADOW_TEXT; bgcolor = COL_INFOBAR_SHADOW_PLUS_0; } @@ -441,7 +441,7 @@ void CMsgBox::refreshTitle(void) m_cBoxFrameTitleRel.iHeight+3+m_cBoxFrame.iY, m_cBoxFrameTitleRel.iWidth - TITLE_ICON_WIDTH + TEXT_BORDER_WIDTH, m_cTitle.c_str(), - (CFBWindow::color_t)COL_MENUHEAD, + COL_MENUHEAD_TEXT, 0, true); // UTF-8 } @@ -454,7 +454,7 @@ void CMsgBox::refreshTitle(void) m_cBoxFrameTitleRel.iHeight+3+m_cBoxFrame.iY, m_cBoxFrameTitleRel.iWidth - TEXT_BORDER_WIDTH, m_cTitle.c_str(), - (CFBWindow::color_t)COL_MENUHEAD, + COL_MENUHEAD_TEXT, 0, true); // UTF-8 } diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index 7d587fe47..59b29f8a9 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -128,7 +128,7 @@ void CProgressWindow::showStatusMessageUTF(const std::string & text) { statusText = text; frameBuffer->paintBox(x, statusTextY-mheight, x+width, statusTextY, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, statusTextY, width-20, text, COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, statusTextY, width-20, text, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 #ifdef VFD_UPDATE CVFD::getInstance()->showProgressBar2(-1,text.c_str()); // set local text in VFD @@ -152,7 +152,7 @@ void CProgressWindow::paint() int ypos=y; frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); if (caption != NONEXISTANT_LOCALE) - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, ypos+ hheight, width - 10, g_Locale->getText(caption), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10, ypos+ hheight, width - 10, g_Locale->getText(caption), COL_MENUHEAD_TEXT, 0, true); // UTF-8 frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); ypos+= hheight + (mheight >>1); @@ -164,7 +164,7 @@ void CProgressWindow::paint() showLocalStatus(0); ypos+= mheight+10; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width- 10, g_Locale->getText(LOCALE_FLASHUPDATE_GLOBALPROGRESS), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+ 10, ypos+ mheight, width- 10, g_Locale->getText(LOCALE_FLASHUPDATE_GLOBALPROGRESS), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 ypos+= mheight; globalstatusY = ypos+ mheight-20; diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 9220b5f61..b4c4a440d 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -560,7 +560,7 @@ void CStringInput::paint(bool sms) icol_o = icol_w + (offset/2); } - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ (offset/2)+ icol_o, y+ hheight, width- offset- icol_o, head ? head : g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ (offset/2)+ icol_o, y+ hheight, width- offset- icol_o, head ? head : g_Locale->getText(name), COL_MENUHEAD_TEXT, 0, true); // UTF-8 int tmp_y = y+ hheight+ offset+ input_h+ offset; if ((hint_1 != NONEXISTANT_LOCALE) || (hint_2 != NONEXISTANT_LOCALE)) @@ -568,12 +568,12 @@ void CStringInput::paint(bool sms) if (hint_1 != NONEXISTANT_LOCALE) { tmp_y += iheight; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_1), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_1), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } if (hint_2 != NONEXISTANT_LOCALE) { tmp_y += iheight; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_2), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_2), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } tmp_y += offset; } @@ -582,7 +582,7 @@ void CStringInput::paint(bool sms) if (sms) { frameBuffer->getIconSize(NEUTRINO_ICON_NUMERIC_PAD, &icol_w, &icol_h); - frameBuffer->paintIcon(NEUTRINO_ICON_NUMERIC_PAD, x + (width/2) - (icol_w/2), tmp_y, 0, COL_MENUCONTENT); + frameBuffer->paintIcon(NEUTRINO_ICON_NUMERIC_PAD, x + (width/2) - (icol_w/2), tmp_y, 0, COL_MENUCONTENT_TEXT); //buttonbar ::paintButtons(x, y+ hheight+ bheight, width, CStringInputSMSButtonsCount, CStringInputSMSButtons, width, fheight); @@ -606,17 +606,17 @@ void CStringInput::paintChar(int pos, const char c) char ch[2] = {c, 0}; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if (pos == selected) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index 9e57bd8ea..af6c9b410 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -301,7 +301,7 @@ void CExtendedInput::paint() frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ (offset/2), y+ hheight, width- offset, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+ (offset/2), y+ hheight, width- offset, g_Locale->getText(name), COL_MENUHEAD_TEXT, 0, true); // UTF-8 int tmp_y = y+ hheight+ offset+ input_h+ offset; @@ -310,12 +310,12 @@ void CExtendedInput::paint() if (hint_1 != NONEXISTANT_LOCALE) { tmp_y += iheight; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_1), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_1), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } if (hint_2 != NONEXISTANT_LOCALE) { tmp_y += iheight; - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_2), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->RenderString(x+ offset, tmp_y, width- 2*offset, g_Locale->getText(hint_2), COL_MENUCONTENT_TEXT, 0, true); // UTF-8 } tmp_y += offset; } @@ -355,17 +355,17 @@ void CExtendedInput_Item_Char::paint(int x, int y, bool focusGained ) char ch[2] = {*data, 0}; - uint8_t color; + fb_pixel_t color; fb_pixel_t bgcolor; if (focusGained) { - color = COL_MENUCONTENTSELECTED; + color = COL_MENUCONTENTSELECTED_TEXT; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; } else { - color = COL_MENUCONTENT; + color = COL_MENUCONTENT_TEXT; bgcolor = COL_MENUCONTENT_PLUS_0; } diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index bd5af4723..342cc64bb 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -174,7 +174,7 @@ void CTextBox::initVar(void) m_nMinWidth = MIN_WINDOW_WIDTH; m_textBackgroundColor = COL_MENUCONTENT_PLUS_0; - m_textColor = COL_MENUCONTENT; + m_textColor = COL_MENUCONTENT_TEXT; m_nPaintBackground = true; m_nBgRadius = 0; m_nBgRadiusType = CORNER_ALL;