diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 765b6a7cd..725eee14d 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -523,6 +523,7 @@ fontmenu.sizes Schriftgrössen fontsize.channel_num_zap Direktauswahl fontsize.channellist Kanalliste fontsize.channellist_descr Beschreibung +fontsize.channellist_event Eventliste fontsize.channellist_number Nummer fontsize.epg_date EPG Datum fontsize.epg_info1 EPG Info 1 diff --git a/data/locale/english.locale b/data/locale/english.locale index dd9e2e276..f02f9fd0b 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -523,12 +523,13 @@ fontmenu.sizes Font sizes fontsize.channel_num_zap direct selection fontsize.channellist Channellist fontsize.channellist_descr Description +fontsize.channellist_event Event list fontsize.channellist_number Number fontsize.epg_date EPG Date fontsize.epg_info1 EPG Info 1 fontsize.epg_info2 EPG Info 2 fontsize.epg_title EPG Title -fontsize.eventlist_datetime Date / Dime +fontsize.eventlist_datetime Date / Time fontsize.eventlist_itemlarge Large fontsize.eventlist_itemsmall Small fontsize.eventlist_title Title diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index c1e34f806..d3042a094 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -110,6 +110,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl selected_chid = 0; footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar previous_channellist_additional = -1; + eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT; //printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout); } @@ -2119,6 +2120,7 @@ void CChannelList::paint_pig (int _x, int _y, int w, int h) void CChannelList::paint_events(int index) { + ffheight = g_Font[eventFont]->getHeight(); readEvents(chanlist[index]->channel_id); frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); @@ -2127,7 +2129,6 @@ void CChannelList::paint_events(int index) CChannelEventList::iterator e; time_t azeit; time(&azeit); - int ffheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(); if ( evtlist.empty() ) { @@ -2166,11 +2167,11 @@ void CChannelList::paint_events(int index) struct tm *tmStartZeit = localtime(&e->startTime); strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit ); //printf("%s %s\n", startTime, e->description.c_str()); - startTimeWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth("88:88"); // use a fixed value - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, COL_MENUCONTENTINACTIVE, 0, true); + startTimeWidth = g_Font[eventFont]->getRenderWidth("88:88"); // use a fixed value + g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, COL_MENUCONTENTINACTIVE, 0, true); startTimeWidth = startTimeWidth +5; } - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, COL_MENUCONTENTDARK, 0, true); + g_Font[eventFont]->RenderString(x+ width+5+startTimeWidth, y+ theight+ pig_height + i*ffheight, infozone_width - startTimeWidth - 20, e->description, COL_MENUCONTENTDARK, 0, true); } else { @@ -2206,6 +2207,7 @@ void CChannelList::readEvents(const t_channel_id channel_id) void CChannelList::showdescription(int index) { + ffheight = g_Font[eventFont]->getHeight(); CZapitChannel* chan = chanlist[index]; CChannelEvent *p_event=NULL; p_event = &chan->currentEvent; @@ -2214,12 +2216,11 @@ void CChannelList::showdescription(int index) CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData); if (!(epgData.info2.empty())) { - int ffheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(); frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); processTextToArray(epgData.info2); for (unsigned int i = 1; (i < epgText.size()+1) && ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height)); i++) { - g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->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 , 0, true); } } } @@ -2257,7 +2258,7 @@ void CChannelList::processTextToArray(std::string text, int screening) // UTF-8 if (*text_!='\n') aktWord += *text_; - int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth(aktWord, true); + int aktWordWidth = g_Font[eventFont]->getRenderWidth(aktWord, true); if ((aktWordWidth+aktWidth)<(infozone_width - 20)) {//space ok, add aktWidth += aktWordWidth; diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 567e9dce8..7fa9e8ed0 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -67,6 +67,8 @@ private: int fheight; // Fonthoehe Channellist-Inhalt int theight; // Fonthoehe Channellist-Titel int footerHeight; + int eventFont; + int ffheight; std::string name; ZapitChannelList chanlist; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index a5e4e8fd6..f7bb7a301 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -81,11 +81,12 @@ COsdSetup::~COsdSetup() } //font settings -const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[4] = +const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[5] = { SNeutrinoSettings::FONT_TYPE_CHANNELLIST, SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR, SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER, + SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT, SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP }; @@ -131,7 +132,7 @@ const SNeutrinoSettings::FONT_TYPES other_font_sizes[5] = font_sizes_groups font_sizes_groups[6] = { {LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS }, - {LOCALE_FONTMENU_CHANNELLIST, 4, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, + {LOCALE_FONTMENU_CHANNELLIST, 5, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS }, {LOCALE_FONTMENU_EVENTLIST , 4, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS }, {LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS }, {LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS }, @@ -160,6 +161,7 @@ font_sizes_struct neutrino_font[FONT_TYPE_COUNT] = {LOCALE_FONTSIZE_CHANNELLIST , 20, FONT_STYLE_BOLD , 1}, {LOCALE_FONTSIZE_CHANNELLIST_DESCR , 20, FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_CHANNELLIST_NUMBER , 14, FONT_STYLE_BOLD , 2}, + {LOCALE_FONTSIZE_CHANNELLIST_EVENT , 17, FONT_STYLE_REGULAR, 2}, {LOCALE_FONTSIZE_CHANNEL_NUM_ZAP , 40, FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_INFOBAR_NUMBER , 50, FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_INFOBAR_CHANNAME , 30, FONT_STYLE_BOLD , 0}, diff --git a/src/system/locals.h b/src/system/locals.h index 709e86e34..0b34fd393 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -550,6 +550,7 @@ typedef enum LOCALE_FONTSIZE_CHANNEL_NUM_ZAP, LOCALE_FONTSIZE_CHANNELLIST, LOCALE_FONTSIZE_CHANNELLIST_DESCR, + LOCALE_FONTSIZE_CHANNELLIST_EVENT, LOCALE_FONTSIZE_CHANNELLIST_NUMBER, LOCALE_FONTSIZE_EPG_DATE, LOCALE_FONTSIZE_EPG_INFO1, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 692062856..c7afa4d8f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -550,6 +550,7 @@ const char * locale_real_names[] = "fontsize.channel_num_zap", "fontsize.channellist", "fontsize.channellist_descr", + "fontsize.channellist_event", "fontsize.channellist_number", "fontsize.epg_date", "fontsize.epg_info1", diff --git a/src/system/settings.h b/src/system/settings.h index e13334304..b3183671e 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -463,7 +463,7 @@ struct SNeutrinoSettings // Font sizes -#define FONT_TYPE_COUNT 23 +#define FONT_TYPE_COUNT 24 enum FONT_TYPES { FONT_TYPE_MENU = 0, FONT_TYPE_MENU_TITLE = 1, @@ -481,13 +481,14 @@ struct SNeutrinoSettings FONT_TYPE_CHANNELLIST = 13, FONT_TYPE_CHANNELLIST_DESCR = 14, FONT_TYPE_CHANNELLIST_NUMBER = 15, - FONT_TYPE_CHANNEL_NUM_ZAP = 16, - FONT_TYPE_INFOBAR_NUMBER = 17, - FONT_TYPE_INFOBAR_CHANNAME = 18, - FONT_TYPE_INFOBAR_INFO = 19, - FONT_TYPE_INFOBAR_SMALL = 20, - FONT_TYPE_FILEBROWSER_ITEM = 21, - FONT_TYPE_MENU_HINT = 22 + FONT_TYPE_CHANNELLIST_EVENT = 16, + FONT_TYPE_CHANNEL_NUM_ZAP = 17, + FONT_TYPE_INFOBAR_NUMBER = 18, + FONT_TYPE_INFOBAR_CHANNAME = 19, + FONT_TYPE_INFOBAR_INFO = 20, + FONT_TYPE_INFOBAR_SMALL = 21, + FONT_TYPE_FILEBROWSER_ITEM = 22, + FONT_TYPE_MENU_HINT = 23 }; // lcdd