From a8cec5244c76da4c5288df0ec7fee87fc04de44a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 15 Aug 2016 18:54:28 +0200 Subject: [PATCH] fonts: add and use own font for all footers Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/54f2ac510f8529b8679a7e665b963ca5baaa45b5 Author: vanhofen Date: 2016-08-15 (Mon, 15 Aug 2016) Origin message was: ------------------ - fonts: add and use own font for all footers ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 1 + data/locale/english.locale | 1 + src/gui/audioplayer.cpp | 2 +- src/gui/bookmarkmanager.cpp | 6 +++--- src/gui/bouquetlist.cpp | 4 ++-- src/gui/channellist.cpp | 4 ++-- src/gui/components/cc_frm_footer.cpp | 2 +- src/gui/components/cc_frm_footer.h | 2 +- src/gui/components/cc_frm_window.cpp | 2 +- src/gui/epgplus.cpp | 4 ++-- src/gui/epgview.cpp | 5 +++-- src/gui/filebrowser.cpp | 14 +++++++------- src/gui/filebrowser.h | 2 +- src/gui/infoviewer_bb.cpp | 8 ++++---- src/gui/moviebrowser.cpp | 2 +- src/gui/osd_setup.cpp | 6 ++++-- src/gui/pictureviewer.cpp | 1 - src/gui/pictureviewer.h | 1 - src/gui/test_menu.cpp | 2 +- src/gui/widget/buttons.cpp | 4 ++-- src/gui/widget/messagebox.cpp | 6 +++--- src/gui/widget/msgbox.cpp | 2 +- src/gui/widget/stringinput.cpp | 2 +- src/system/locals.h | 1 + src/system/locals_intern.h | 1 + src/system/settings.h | 1 + 26 files changed, 46 insertions(+), 40 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 21fcfa495..1b36d22fb 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -731,6 +731,7 @@ fontsize.infobar_info Info fontsize.infobar_number Nummer fontsize.infobar_small Klein fontsize.menu Menütext +fontsize.menu_foot Fußleiste (in allen GUI-Elementen) fontsize.menu_hint Menü-Hilfe fontsize.menu_info Menüinfo fontsize.menu_title Menütitel diff --git a/data/locale/english.locale b/data/locale/english.locale index d354679e3..bbcc2522c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -731,6 +731,7 @@ fontsize.infobar_info info fontsize.infobar_number Number fontsize.infobar_small Small fontsize.menu Menu text +fontsize.menu_foot Footer (in all GUI elements) fontsize.menu_hint Menu hints fontsize.menu_info Menu Info fontsize.menu_title Menu Title diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 4175510c2..4ec247957 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -254,7 +254,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_width = m_frameBuffer->getScreenWidthRel(); m_height = m_frameBuffer->getScreenHeightRel(); - m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); + m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight(); m_buttonHeight = std::max(25, m_sheight); m_theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 15c2335aa..bcbe278cb 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -226,7 +226,7 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent) selected = 0; // Max width = 90; - footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8; //initial height value for buttonbar + footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+8; //initial height value for buttonbar theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); x=getScreenStartX( width ); @@ -439,14 +439,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_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->RenderString(x+width-1 * ButtonWidth + 38, y+height+footerHeight - 2, ButtonWidth- 28, g_Locale->getText(LOCALE_BOOKMARKMANAGER_SELECT), COL_INFOBAR_TEXT); } 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_TEXT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->RenderString(x+width-1 * ButtonWidth + 38, y+height+footerHeight - 2, ButtonWidth- 28, g_Locale->getText(LOCALE_BOOKMARKMANAGER_SELECT), COL_INFOBAR_TEXT); } } diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 223428107..5a37aa10a 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -412,7 +412,7 @@ int CBouquetList::show(bool bShowChannelList) favonly = !bShowChannelList; for(unsigned int count = 0; count < sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]);count++){ - int w_text = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(CBouquetListButtons[count].locale)); + int w_text = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(g_Locale->getText(CBouquetListButtons[count].locale)); w_max_text = std::max(w_max_text, w_text); frameBuffer->getIconSize(CBouquetListButtons[count].button, &icol_w, &icol_h); w_max_icon = std::max(w_max_icon, icol_w); @@ -426,7 +426,7 @@ int CBouquetList::show(bool bShowChannelList) width = w_max (need_width, 20); height = h_max (16 * fheight, 40); - footerHeight = std::max(h_max_icon+8, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8); + footerHeight = std::max(h_max_icon+8, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+8); theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); listmaxshow = (height - theight - footerHeight)/fheight; height = theight + footerHeight + listmaxshow * fheight; // recalc height diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 428fdb19e..0fcb5da92 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -108,7 +108,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl vlist = _vlist; new_zap_mode = 0; selected_chid = 0; - footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar + footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+6; //initial height value for buttonbar theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); fdescrheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight(); @@ -469,7 +469,7 @@ void CChannelList::calcSize() if (fheight == 0) fheight = 1; /* avoid div-by-zero crash on invalid font */ - footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; + footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+6; pig_on_win = ( (g_settings.channellist_additional == 2) /* with miniTV */ && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) ); // calculate width diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index cf95d611b..de72490fd 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -68,7 +68,7 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const width = w == 0 ? frameBuffer->getScreenWidth(true) : w; //init footer height - cch_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; + cch_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; height = max(h, cch_font->getHeight()); shadow = shadow_mode; diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 886cba39f..bd41de717 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -136,7 +136,7 @@ class CComponentsFooter : public CComponentsHeader const struct button_label * const content, const int& label_width = 0, const int& context_buttons = 0, - Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], + Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT], bool do_save_bg = CC_SAVE_SCREEN_NO ); diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index c8db90c8e..869acd530 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -144,7 +144,7 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const ccw_right_sidebar= NULL; ccw_body = NULL; ccw_footer = NULL; - ccw_button_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; + ccw_button_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; ccw_buttons = 0; //no header buttons ccw_show_footer = true; diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index d3e4f691e..94ab4af35 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -434,7 +434,7 @@ EpgPlus::Footer::Footer (CFrameBuffer * pframeBuffer, int px, int py, int pwidth this->x = px; this->y = py; this->width = pwidth; - this->buttonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8; //TODO get height from buttons + this->buttonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+8; //TODO get height from buttons } EpgPlus::Footer::~Footer() @@ -695,7 +695,7 @@ void EpgPlus::init() // if(icol_h < h2) // icol_h = h2; - int buttonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8; //TODO get height from buttons/*std::max (icol_h+8, fonts[EPGPlus_footer_fontbuttons]->getHeight());*/ + int buttonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+8; //TODO get height from buttons/*std::max (icol_h+8, fonts[EPGPlus_footer_fontbuttons]->getHeight());*/ int footerHeight = Footer::getUsedHeight() + buttonHeight; this->maxNumberOfDisplayableEntries = (this->usableScreenHeight - headerHeight - timeLineHeight - horGap1Height - horGap2Height - footerHeight) / this->entryHeight; diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index dcbc2b9bf..14f1f26bc 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -142,7 +142,7 @@ void CEpgData::start() topheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getHeight(); topboxheight = topheight + 6; botboxheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight() + 6; - buttonheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; + buttonheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight() + 6; if (buttonheight < 30) buttonheight = 30; // the buttons and icons need space oy-=buttonheight/2; @@ -1499,7 +1499,8 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info) y = sy + oy; w = ox; - fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); + // why we don't use buttonheight member? + fh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight(); frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h); h = std::max(fh, icol_h+4); diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 05b0a8e58..a763d136f 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -262,7 +262,7 @@ void CFileBrowser::fontInit() { fnt_title = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; fnt_item = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]; - fnt_small = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; + fnt_foot = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; width = frameBuffer->getScreenWidthRel(); height = frameBuffer->getScreenHeightRel(); x = getScreenStartX(width); @@ -271,7 +271,7 @@ void CFileBrowser::fontInit() fheight = fnt_item->getHeight(); if (fheight == 0) fheight = 1; /* avoid div by zero on invalid font */ - //foheight = fnt_small->getHeight()+6; //initial height value for buttonbar; TODO get value from buttonbar + //foheight = fnt_foot->getHeight()+6; //initial height value for buttonbar; TODO get value from buttonbar foheight = paintFoot(false); skwidth = 26; @@ -1374,10 +1374,10 @@ int CFileBrowser::paintFoot(bool show) std::string sort_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_SORT); sort_text += g_Locale->getText(sortByNames[g_settings.filebrowser_sortmethod]); - int sort_text_len = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_SORT)); + int sort_text_len = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_SORT)); int len = 0; for (int i = 0; i < FILEBROWSER_NUMBER_OF_SORT_VARIANTS; i++) - len = std::max(len, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(sortByNames[i]))); + len = std::max(len, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(g_Locale->getText(sortByNames[i]))); sort_text_len += len; @@ -1429,7 +1429,7 @@ int CFileBrowser::paintFoot(bool show) void CFileBrowser::paintSMSKey() { - int skheight = fnt_small->getHeight(); + int skheight = fnt_foot->getHeight(); //background frameBuffer->paintBoxRel(x + width - skwidth, y + height - foheight, skwidth, foheight, COL_MENUFOOT_PLUS_0, RADIUS_MID, CORNER_BOTTOM_RIGHT); @@ -1438,8 +1438,8 @@ void CFileBrowser::paintSMSKey() { char cKey[2] = {m_SMSKeyInput.getOldKey(), 0}; cKey[0] = toupper(cKey[0]); - int len = fnt_small->getRenderWidth(cKey); - fnt_small->RenderString(x + width - skwidth, y + height - foheight + foheight/2 + skheight/2, len, cKey, COL_MENUHEAD_TEXT); + int len = fnt_foot->getRenderWidth(cKey); + fnt_foot->RenderString(x + width - skwidth, y + height - foheight + foheight/2 + skheight/2, len, cKey, COL_MENUHEAD_TEXT); } } diff --git a/src/gui/filebrowser.h b/src/gui/filebrowser.h index b0f640821..16e13b916 100644 --- a/src/gui/filebrowser.h +++ b/src/gui/filebrowser.h @@ -147,7 +147,7 @@ class CFileBrowser CFrameBuffer *frameBuffer; Font *fnt_title; Font *fnt_item; - Font *fnt_small; + Font *fnt_foot; CFileList selected_filelist; bool readDir(const std::string & dirname, CFileList* flist); diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 8615fa811..b1ca798e6 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -108,7 +108,7 @@ void CInfoViewerBB::Init() bbButtonInfo[i].x = -1; } - InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 5; + InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight() + 5; initBBOffset(); changePB(); @@ -146,7 +146,7 @@ void CInfoViewerBB::getBBIconInfo() bbIconMaxH = 0; initBBOffset(); BBarY = g_InfoViewer->BoxEndY + bottom_bar_offset; - BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) / 2; /* center in buttonbar */ + BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()) / 2; /* center in buttonbar */ bbIconMinX = g_InfoViewer->BoxEndX - 8; //should be 10px, but 2px will be reduced for each icon CNeutrinoApp* neutrino = CNeutrinoApp::getInstance(); @@ -286,7 +286,7 @@ void CInfoViewerBB::getBBButtonInfo() if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO) && !g_settings.infobar_buttons_usertitle) text = CMoviePlayerGui::getInstance(false).CurrentAudioName(); // use instance_mp } - bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(text) + w + 10; + bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(text) + w + 10; bbButtonInfo[i].cx = w + 5; bbButtonInfo[i].h = h; bbButtonInfo[i].text = text; @@ -431,7 +431,7 @@ void CInfoViewerBB::showBBButtons(bool paintFooter) if (bbButtonInfo[i].active) { 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, + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->RenderString(bbButtonInfo[i].x + bbButtonInfo[i].cx, BBarFontY, bbButtonInfo[i].w - bbButtonInfo[i].cx, bbButtonInfo[i].text, COL_MENUFOOT_TEXT); } } diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index fa8dc16c2..99c376188 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -143,7 +143,7 @@ const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_ #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] +#define FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT] #define INTER_FRAME_SPACE 4 // space between e.g. upper and lower window diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 06065b2c0..cd2576c42 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -134,11 +134,12 @@ const SNeutrinoSettings::FONT_TYPES epg_font_sizes[4] = SNeutrinoSettings::FONT_TYPE_EPG_DATE }; -const SNeutrinoSettings::FONT_TYPES menu_font_sizes[4] = +const SNeutrinoSettings::FONT_TYPES menu_font_sizes[5] = { SNeutrinoSettings::FONT_TYPE_MENU_TITLE, SNeutrinoSettings::FONT_TYPE_MENU, SNeutrinoSettings::FONT_TYPE_MENU_INFO, + SNeutrinoSettings::FONT_TYPE_MENU_FOOT, SNeutrinoSettings::FONT_TYPE_MENU_HINT }; const SNeutrinoSettings::FONT_TYPES other_font_sizes[2] = @@ -150,7 +151,7 @@ const SNeutrinoSettings::FONT_TYPES other_font_sizes[2] = #define FONT_GROUP_COUNT 6 font_sizes_groups font_sizes_groups[FONT_GROUP_COUNT] = { - {LOCALE_FONTMENU_MENU , 4, menu_font_sizes , "fontsize.dmen", LOCALE_MENU_HINT_MENU_FONTS }, + {LOCALE_FONTMENU_MENU , 5, menu_font_sizes , "fontsize.dmen", LOCALE_MENU_HINT_MENU_FONTS }, {LOCALE_FONTMENU_CHANNELLIST, 5, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, {LOCALE_FONTMENU_EVENTLIST , 5, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS }, {LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS }, @@ -163,6 +164,7 @@ font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] = {LOCALE_FONTSIZE_MENU , 20, CNeutrinoFonts::FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_MENU_TITLE , 30, CNeutrinoFonts::FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_MENU_INFO , 16, CNeutrinoFonts::FONT_STYLE_REGULAR, 0}, + {LOCALE_FONTSIZE_MENU_FOOT , 14, CNeutrinoFonts::FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_EPG_TITLE , 25, CNeutrinoFonts::FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_EPG_INFO1 , 17, CNeutrinoFonts::FONT_STYLE_ITALIC , 2}, {LOCALE_FONTSIZE_EPG_INFO2 , 17, CNeutrinoFonts::FONT_STYLE_REGULAR, 2}, diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index fc579577d..3f776af5e 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -162,7 +162,6 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) width = frameBuffer->getScreenWidthRel(); height = frameBuffer->getScreenHeightRel(); - sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); diff --git a/src/gui/pictureviewer.h b/src/gui/pictureviewer.h index 500635b0c..2d5410148 100644 --- a/src/gui/pictureviewer.h +++ b/src/gui/pictureviewer.h @@ -76,7 +76,6 @@ class CPictureViewerGui : public CMenuTarget unsigned int listmaxshow; int fheight; // Fonthoehe Playlist-Inhalt int theight; // Fonthoehe Playlist-Titel - int sheight; // Fonthoehe MP Info int footerHeight; int buttons1Height; int buttons2Height; diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index b9116d6f2..2ad4e0734 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -550,7 +550,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) if (footer == NULL){ footer = new CComponentsFooter (100, 30, 1000, hh, CComponentsFooter::CC_BTN_HELP | CComponentsFooter::CC_BTN_EXIT | CComponentsFooter::CC_BTN_MENU |CComponentsFooter::CC_BTN_MUTE_ZAP_ACTIVE, NULL, true); //int start = 5, btnw =90, btnh = 37; - footer->setButtonFont(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]); + footer->setButtonFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]); footer->setIcon(NEUTRINO_ICON_INFO); //add button labels with conventional button label struct diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index 9143995fc..a427be80a 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -97,7 +97,7 @@ int paintButtons( const button_label_ext * const content, int *wantedheight) { CFrameBuffer *frameBuffer = CFrameBuffer::getInstance(); - Font * font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; + Font * font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; int cnt = count; int x_footer = x; int y_footer = y; @@ -306,7 +306,7 @@ int paintButtons( const int &x, const std::vector& /*all_buttontext_id*/) { CFrameBuffer *frameBuffer = CFrameBuffer::getInstance(); - Font * font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]; + Font * font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; uint cnt = count; int x_footer = x; int y_footer = y; diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index 87b1e5664..f7e497846 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -73,7 +73,7 @@ void CMessageBox::Init(const CMessageBox::result_ &Default, const uint32_t ShowB ih = std::max(h, ih); i_maxw = std::max(w, i_maxw); } - fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); + fh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight(); b_height = std::max(fh, ih) + 8 + (RADIUS_MID / 2); m_bbheight = b_height + fh/2 + ButtonSpacing + SHADOW_OFFSET; result = Default; @@ -131,7 +131,7 @@ int CMessageBox::getButtonWidth() neutrino_locale_t localeMsg[localeMsgCount] = {LOCALE_MESSAGEBOX_YES, LOCALE_MESSAGEBOX_NO, LOCALE_MESSAGEBOX_CANCEL, LOCALE_MESSAGEBOX_OK, LOCALE_MESSAGEBOX_BACK}; int MaxButtonTextWidth = 0; for (int i = 0; i < localeMsgCount; i++) - MaxButtonTextWidth = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(localeMsg[i])), MaxButtonTextWidth); + MaxButtonTextWidth = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(g_Locale->getText(localeMsg[i])), MaxButtonTextWidth); return MaxButtonTextWidth + i_maxw + 36 + (RADIUS_LARGE / 2); } @@ -180,7 +180,7 @@ void CMessageBox::paintButtons() m_window->paintBoxRel(xpos, ypos, b_width, b_height, (CFBWindow::color_t)bgcolor, RADIUS_MID); m_window->paintBoxFrame(xpos, ypos, b_width, b_height, 1, COL_SHADOW_PLUS_0, RADIUS_MID); m_window->paintIcon(Buttons[i].icon, xpos + ((b_height - ih) / 2), ypos + ((b_height - ih) / 2), ih); - m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], xpos + iw + 17, ypos + fh + ((b_height - fh) / 2), + m_window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT], xpos + iw + 17, ypos + fh + ((b_height - fh) / 2), b_width - (iw + 21), Buttons[i].text, (CFBWindow::color_t)color); xpos += b_width + ButtonDistance; } diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 09ea4d5e6..503e79233 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -67,7 +67,7 @@ #define MIN_WINDOW_HEIGHT 40 #define DEFAULT_TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] -#define DEFAULT_FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL] +#define DEFAULT_FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT] ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index e6354805e..4651d33d1 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -108,7 +108,7 @@ void CStringInput::init() #endif hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); iheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getHeight(); - fheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 6; // init min buttonbar height + fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight() + 6; // init min buttonbar height input_h = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight() + 2; // font height + border input_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("M") + 2; // hack font width + border offset = 20; diff --git a/src/system/locals.h b/src/system/locals.h index 04cc34b25..2e832f0d9 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -758,6 +758,7 @@ typedef enum LOCALE_FONTSIZE_INFOBAR_NUMBER, LOCALE_FONTSIZE_INFOBAR_SMALL, LOCALE_FONTSIZE_MENU, + LOCALE_FONTSIZE_MENU_FOOT, LOCALE_FONTSIZE_MENU_HINT, LOCALE_FONTSIZE_MENU_INFO, LOCALE_FONTSIZE_MENU_TITLE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 59ebb6ffb..a195a53b2 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -758,6 +758,7 @@ const char * locale_real_names[] = "fontsize.infobar_number", "fontsize.infobar_small", "fontsize.menu", + "fontsize.menu_foot", "fontsize.menu_hint", "fontsize.menu_info", "fontsize.menu_title", diff --git a/src/system/settings.h b/src/system/settings.h index 8e2b794e1..b6310ed1e 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -647,6 +647,7 @@ struct SNeutrinoSettings FONT_TYPE_MENU = 0, FONT_TYPE_MENU_TITLE, FONT_TYPE_MENU_INFO, + FONT_TYPE_MENU_FOOT, FONT_TYPE_EPG_TITLE, FONT_TYPE_EPG_INFO1, FONT_TYPE_EPG_INFO2,