styling for EPG view/eventlist (patch from Benny, thanks!)

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5809315cc5
Author: martii <m4rtii@gmx.de>
Date: 2014-05-27 (Tue, 27 May 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-05-27 12:04:25 +02:00
committed by vanhofen
parent 67ca20c2c4
commit 2792c9e945
2 changed files with 16 additions and 24 deletions

View File

@@ -180,7 +180,7 @@ void CEpgData::processTextToArray(std::string text, int screening) // UTF-8
// check the wordwidth - add to this line if size ok
int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord, true);
if ((aktWordWidth+aktWidth)<(ox- 20- 15))
if ((aktWordWidth+aktWidth)<(ox - 20 - 15))
{//space ok, add
aktWidth += aktWordWidth;
aktLine += aktWord;
@@ -228,10 +228,10 @@ void CEpgData::showText( int startPos, int ypos )
int max_mon_w = 0, max_wday_w = 0;
int digi = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth("29..");
for(int i = 0; i < 12;i++){
max_mon_w = std::max(max_mon_w ,g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getMonth(i))) + ".", true)); // UTF-8
max_mon_w = std::max(max_mon_w, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getMonth(i))) + " ", true)); // UTF-8
if(i > 6)
continue;
max_wday_w = std::max(max_wday_w ,g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getWeekday(i))) + ".", true)); // UTF-8
continue;
max_wday_w = std::max(max_wday_w, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(std::string(g_Locale->getText(CLocaleManager::getWeekday(i))) + " ", true)); // UTF-8
}
frameBuffer->paintBoxRel(sx, y, ox- 15, sb, COL_MENUCONTENT_PLUS_0); // background of the text box
for (int i = startPos; i < textSize && i < startPos + medlinecount; i++, y += medlineheight)
@@ -245,7 +245,7 @@ void CEpgData::showText( int startPos, int ypos )
offset += max_wday_w;
break;
case 3:
offset += max_mon_w;
offset += max_mon_w/2;
break;
default:
offset += digi;
@@ -1111,15 +1111,9 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
tmStartZeit = localtime(&(e->startTime));
screening_dates = g_Locale->getText(CLocaleManager::getWeekday(tmStartZeit));
screening_dates += '.';
strftime(tmpstr, sizeof(tmpstr), " %d.", tmStartZeit );
screening_dates += tmpstr;
screening_dates += strftime(", %d", tmStartZeit);
screening_dates += g_Locale->getText(CLocaleManager::getMonth(tmStartZeit));
strftime(tmpstr, sizeof(tmpstr), ". %H:%M", tmStartZeit );
screening_dates += tmpstr;
screening_dates += strftime(", %R", tmStartZeit);
if (e->startTime <= tmp_curent_zeit)
flag = 2;
else