mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
channellist.cpp: Use extra font for event list
Origin commit data
------------------
Branch: ni/coolstream
Commit: 105c6b4c70
Author: tomworld <atzeworld@msn.com>
Date: 2013-02-12 (Tue, 12 Feb 2013)
Origin message was:
------------------
* channellist.cpp: Use extra font for event list
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Michael Liebmann
parent
75aa795138
commit
177ebb4fba
@@ -523,6 +523,7 @@ fontmenu.sizes Schriftgrössen
|
|||||||
fontsize.channel_num_zap Direktauswahl
|
fontsize.channel_num_zap Direktauswahl
|
||||||
fontsize.channellist Kanalliste
|
fontsize.channellist Kanalliste
|
||||||
fontsize.channellist_descr Beschreibung
|
fontsize.channellist_descr Beschreibung
|
||||||
|
fontsize.channellist_event Eventliste
|
||||||
fontsize.channellist_number Nummer
|
fontsize.channellist_number Nummer
|
||||||
fontsize.epg_date EPG Datum
|
fontsize.epg_date EPG Datum
|
||||||
fontsize.epg_info1 EPG Info 1
|
fontsize.epg_info1 EPG Info 1
|
||||||
|
@@ -523,12 +523,13 @@ fontmenu.sizes Font sizes
|
|||||||
fontsize.channel_num_zap direct selection
|
fontsize.channel_num_zap direct selection
|
||||||
fontsize.channellist Channellist
|
fontsize.channellist Channellist
|
||||||
fontsize.channellist_descr Description
|
fontsize.channellist_descr Description
|
||||||
|
fontsize.channellist_event Event list
|
||||||
fontsize.channellist_number Number
|
fontsize.channellist_number Number
|
||||||
fontsize.epg_date EPG Date
|
fontsize.epg_date EPG Date
|
||||||
fontsize.epg_info1 EPG Info 1
|
fontsize.epg_info1 EPG Info 1
|
||||||
fontsize.epg_info2 EPG Info 2
|
fontsize.epg_info2 EPG Info 2
|
||||||
fontsize.epg_title EPG Title
|
fontsize.epg_title EPG Title
|
||||||
fontsize.eventlist_datetime Date / Dime
|
fontsize.eventlist_datetime Date / Time
|
||||||
fontsize.eventlist_itemlarge Large
|
fontsize.eventlist_itemlarge Large
|
||||||
fontsize.eventlist_itemsmall Small
|
fontsize.eventlist_itemsmall Small
|
||||||
fontsize.eventlist_title Title
|
fontsize.eventlist_title Title
|
||||||
|
@@ -110,6 +110,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
|
|||||||
selected_chid = 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_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar
|
||||||
previous_channellist_additional = -1;
|
previous_channellist_additional = -1;
|
||||||
|
eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT;
|
||||||
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
|
//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)
|
void CChannelList::paint_events(int index)
|
||||||
{
|
{
|
||||||
|
ffheight = g_Font[eventFont]->getHeight();
|
||||||
readEvents(chanlist[index]->channel_id);
|
readEvents(chanlist[index]->channel_id);
|
||||||
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0);
|
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;
|
CChannelEventList::iterator e;
|
||||||
time_t azeit;
|
time_t azeit;
|
||||||
time(&azeit);
|
time(&azeit);
|
||||||
int ffheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight();
|
|
||||||
|
|
||||||
if ( evtlist.empty() )
|
if ( evtlist.empty() )
|
||||||
{
|
{
|
||||||
@@ -2166,11 +2167,11 @@ void CChannelList::paint_events(int index)
|
|||||||
struct tm *tmStartZeit = localtime(&e->startTime);
|
struct tm *tmStartZeit = localtime(&e->startTime);
|
||||||
strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit );
|
strftime(startTime, sizeof(startTime), "%H:%M", tmStartZeit );
|
||||||
//printf("%s %s\n", startTime, e->description.c_str());
|
//printf("%s %s\n", startTime, e->description.c_str());
|
||||||
startTimeWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getRenderWidth("88:88"); // use a fixed value
|
startTimeWidth = g_Font[eventFont]->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);
|
g_Font[eventFont]->RenderString(x+ width+5, y+ theight+ pig_height + i*ffheight, startTimeWidth, startTime, COL_MENUCONTENTINACTIVE, 0, true);
|
||||||
startTimeWidth = startTimeWidth +5;
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -2206,6 +2207,7 @@ void CChannelList::readEvents(const t_channel_id channel_id)
|
|||||||
|
|
||||||
void CChannelList::showdescription(int index)
|
void CChannelList::showdescription(int index)
|
||||||
{
|
{
|
||||||
|
ffheight = g_Font[eventFont]->getHeight();
|
||||||
CZapitChannel* chan = chanlist[index];
|
CZapitChannel* chan = chanlist[index];
|
||||||
CChannelEvent *p_event=NULL;
|
CChannelEvent *p_event=NULL;
|
||||||
p_event = &chan->currentEvent;
|
p_event = &chan->currentEvent;
|
||||||
@@ -2214,12 +2216,11 @@ void CChannelList::showdescription(int index)
|
|||||||
CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData);
|
CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData);
|
||||||
if (!(epgData.info2.empty()))
|
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);
|
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0);
|
||||||
processTextToArray(epgData.info2);
|
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++)
|
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')
|
if (*text_!='\n')
|
||||||
aktWord += *text_;
|
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))
|
if ((aktWordWidth+aktWidth)<(infozone_width - 20))
|
||||||
{//space ok, add
|
{//space ok, add
|
||||||
aktWidth += aktWordWidth;
|
aktWidth += aktWordWidth;
|
||||||
|
@@ -67,6 +67,8 @@ private:
|
|||||||
int fheight; // Fonthoehe Channellist-Inhalt
|
int fheight; // Fonthoehe Channellist-Inhalt
|
||||||
int theight; // Fonthoehe Channellist-Titel
|
int theight; // Fonthoehe Channellist-Titel
|
||||||
int footerHeight;
|
int footerHeight;
|
||||||
|
int eventFont;
|
||||||
|
int ffheight;
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
ZapitChannelList chanlist;
|
ZapitChannelList chanlist;
|
||||||
|
@@ -81,11 +81,12 @@ COsdSetup::~COsdSetup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//font settings
|
//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,
|
||||||
SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR,
|
SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR,
|
||||||
SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER,
|
SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER,
|
||||||
|
SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT,
|
||||||
SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP
|
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] =
|
font_sizes_groups font_sizes_groups[6] =
|
||||||
{
|
{
|
||||||
{LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS },
|
{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_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_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 },
|
{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 , 20, FONT_STYLE_BOLD , 1},
|
||||||
{LOCALE_FONTSIZE_CHANNELLIST_DESCR , 20, FONT_STYLE_REGULAR, 1},
|
{LOCALE_FONTSIZE_CHANNELLIST_DESCR , 20, FONT_STYLE_REGULAR, 1},
|
||||||
{LOCALE_FONTSIZE_CHANNELLIST_NUMBER , 14, FONT_STYLE_BOLD , 2},
|
{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_CHANNEL_NUM_ZAP , 40, FONT_STYLE_BOLD , 0},
|
||||||
{LOCALE_FONTSIZE_INFOBAR_NUMBER , 50, FONT_STYLE_BOLD , 0},
|
{LOCALE_FONTSIZE_INFOBAR_NUMBER , 50, FONT_STYLE_BOLD , 0},
|
||||||
{LOCALE_FONTSIZE_INFOBAR_CHANNAME , 30, FONT_STYLE_BOLD , 0},
|
{LOCALE_FONTSIZE_INFOBAR_CHANNAME , 30, FONT_STYLE_BOLD , 0},
|
||||||
|
@@ -550,6 +550,7 @@ typedef enum
|
|||||||
LOCALE_FONTSIZE_CHANNEL_NUM_ZAP,
|
LOCALE_FONTSIZE_CHANNEL_NUM_ZAP,
|
||||||
LOCALE_FONTSIZE_CHANNELLIST,
|
LOCALE_FONTSIZE_CHANNELLIST,
|
||||||
LOCALE_FONTSIZE_CHANNELLIST_DESCR,
|
LOCALE_FONTSIZE_CHANNELLIST_DESCR,
|
||||||
|
LOCALE_FONTSIZE_CHANNELLIST_EVENT,
|
||||||
LOCALE_FONTSIZE_CHANNELLIST_NUMBER,
|
LOCALE_FONTSIZE_CHANNELLIST_NUMBER,
|
||||||
LOCALE_FONTSIZE_EPG_DATE,
|
LOCALE_FONTSIZE_EPG_DATE,
|
||||||
LOCALE_FONTSIZE_EPG_INFO1,
|
LOCALE_FONTSIZE_EPG_INFO1,
|
||||||
|
@@ -550,6 +550,7 @@ const char * locale_real_names[] =
|
|||||||
"fontsize.channel_num_zap",
|
"fontsize.channel_num_zap",
|
||||||
"fontsize.channellist",
|
"fontsize.channellist",
|
||||||
"fontsize.channellist_descr",
|
"fontsize.channellist_descr",
|
||||||
|
"fontsize.channellist_event",
|
||||||
"fontsize.channellist_number",
|
"fontsize.channellist_number",
|
||||||
"fontsize.epg_date",
|
"fontsize.epg_date",
|
||||||
"fontsize.epg_info1",
|
"fontsize.epg_info1",
|
||||||
|
@@ -463,7 +463,7 @@ struct SNeutrinoSettings
|
|||||||
|
|
||||||
|
|
||||||
// Font sizes
|
// Font sizes
|
||||||
#define FONT_TYPE_COUNT 23
|
#define FONT_TYPE_COUNT 24
|
||||||
enum FONT_TYPES {
|
enum FONT_TYPES {
|
||||||
FONT_TYPE_MENU = 0,
|
FONT_TYPE_MENU = 0,
|
||||||
FONT_TYPE_MENU_TITLE = 1,
|
FONT_TYPE_MENU_TITLE = 1,
|
||||||
@@ -481,13 +481,14 @@ struct SNeutrinoSettings
|
|||||||
FONT_TYPE_CHANNELLIST = 13,
|
FONT_TYPE_CHANNELLIST = 13,
|
||||||
FONT_TYPE_CHANNELLIST_DESCR = 14,
|
FONT_TYPE_CHANNELLIST_DESCR = 14,
|
||||||
FONT_TYPE_CHANNELLIST_NUMBER = 15,
|
FONT_TYPE_CHANNELLIST_NUMBER = 15,
|
||||||
FONT_TYPE_CHANNEL_NUM_ZAP = 16,
|
FONT_TYPE_CHANNELLIST_EVENT = 16,
|
||||||
FONT_TYPE_INFOBAR_NUMBER = 17,
|
FONT_TYPE_CHANNEL_NUM_ZAP = 17,
|
||||||
FONT_TYPE_INFOBAR_CHANNAME = 18,
|
FONT_TYPE_INFOBAR_NUMBER = 18,
|
||||||
FONT_TYPE_INFOBAR_INFO = 19,
|
FONT_TYPE_INFOBAR_CHANNAME = 19,
|
||||||
FONT_TYPE_INFOBAR_SMALL = 20,
|
FONT_TYPE_INFOBAR_INFO = 20,
|
||||||
FONT_TYPE_FILEBROWSER_ITEM = 21,
|
FONT_TYPE_INFOBAR_SMALL = 21,
|
||||||
FONT_TYPE_MENU_HINT = 22
|
FONT_TYPE_FILEBROWSER_ITEM = 22,
|
||||||
|
FONT_TYPE_MENU_HINT = 23
|
||||||
};
|
};
|
||||||
|
|
||||||
// lcdd
|
// lcdd
|
||||||
|
Reference in New Issue
Block a user