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

This reverts commit 5809315cc5
because this commit seems to need some more affection.
This commit is contained in:
svenhoefer
2014-05-27 17:21:42 +02:00
parent 5809315cc5
commit 193c49d55e
2 changed files with 24 additions and 16 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 // check the wordwidth - add to this line if size ok
int aktWordWidth = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth(aktWord, true); 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 {//space ok, add
aktWidth += aktWordWidth; aktWidth += aktWordWidth;
aktLine += aktWord; aktLine += aktWord;
@@ -228,10 +228,10 @@ void CEpgData::showText( int startPos, int ypos )
int max_mon_w = 0, max_wday_w = 0; int max_mon_w = 0, max_wday_w = 0;
int digi = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth("29.."); int digi = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getRenderWidth("29..");
for(int i = 0; i < 12;i++){ 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) if(i > 6)
continue; 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 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 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) 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; offset += max_wday_w;
break; break;
case 3: case 3:
offset += max_mon_w/2; offset += max_mon_w;
break; break;
default: default:
offset += digi; offset += digi;
@@ -1111,9 +1111,15 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
tmStartZeit = localtime(&(e->startTime)); tmStartZeit = localtime(&(e->startTime));
screening_dates = g_Locale->getText(CLocaleManager::getWeekday(tmStartZeit)); screening_dates = g_Locale->getText(CLocaleManager::getWeekday(tmStartZeit));
screening_dates += strftime(", %d", tmStartZeit); screening_dates += '.';
strftime(tmpstr, sizeof(tmpstr), " %d.", tmStartZeit );
screening_dates += tmpstr;
screening_dates += g_Locale->getText(CLocaleManager::getMonth(tmStartZeit)); screening_dates += g_Locale->getText(CLocaleManager::getMonth(tmStartZeit));
screening_dates += strftime(", %R", tmStartZeit);
strftime(tmpstr, sizeof(tmpstr), ". %H:%M", tmStartZeit );
screening_dates += tmpstr;
if (e->startTime <= tmp_curent_zeit) if (e->startTime <= tmp_curent_zeit)
flag = 2; flag = 2;
else else

View File

@@ -749,11 +749,16 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI)
datetime1_str = g_Locale->getText(CLocaleManager::getWeekday(tmStartZeit)); datetime1_str = g_Locale->getText(CLocaleManager::getWeekday(tmStartZeit));
datetime1_str += strftime(", %H:%M,", tmStartZeit );
datetime1_str += strftime(" %d", tmStartZeit );
datetime1_str += g_Locale->getText(CLocaleManager::getMonth(tmStartZeit));
//datetime2_str += '.'; strftime(tmpstr, sizeof(tmpstr), ". %H:%M, ", tmStartZeit );
datetime1_str += tmpstr;
strftime(tmpstr, sizeof(tmpstr), " %d. ", tmStartZeit );
datetime2_str = tmpstr;
datetime2_str += g_Locale->getText(CLocaleManager::getMonth(tmStartZeit));
datetime2_str += '.';
if ( m_showChannel ) // show the channel if we made a event search only (which could be made through all channels ). if ( m_showChannel ) // show the channel if we made a event search only (which could be made through all channels ).
{ {
@@ -767,11 +772,8 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI)
} }
// 1st line // 1st line
int fwidth1a=g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth(datetime1_str); g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5, ypos+ fheight1+3, fwidth1+5, datetime1_str, color, 0, true); // UTF-8
//int fwidth1b=g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->getRenderWidth(datetime2_str); g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5+fwidth1, ypos+ fheight1+3, width-fwidth1-10- 20, datetime2_str, color, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5, ypos+ fheight1+3, fwidth1a, datetime1_str, color, 0, true); // UTF-8
//g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME]->RenderString(x+5+fwidth1a/2, ypos+ fheight1+3, fwidth1b, datetime2_str, color, 0, true); // UTF-8
int seit = ( evtlist[curpos].startTime - time(NULL) ) / 60; int seit = ( evtlist[curpos].startTime - time(NULL) ) / 60;
if ( (seit> 0) && (seit<100) && (duration_str.length()!=0) ) if ( (seit> 0) && (seit<100) && (duration_str.length()!=0) )