From 61be651f9642661535046dbb3af21844ad668f3a Mon Sep 17 00:00:00 2001 From: Frank Neumann Date: Sun, 21 May 2017 20:04:45 +0200 Subject: Commit t2s_rerunandtab.diff (thx tomas@vdr-portal.de) --- HISTORY | 2 ++ Makefile | 1 + common.c | 10 ++++++++-- render.c | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index cbcfba0..a9aaab5 100644 --- a/HISTORY +++ b/HISTORY @@ -6,6 +6,8 @@ VDR Plugin 'text2skin' Revision History - New tokens: UsedDiskSpace, TotalDiskSpace, VideoSizeWidth, VideoSizeHeight (closes #465, thanks to NemoN). - Documentation fixes. +- Commit t2s_rerunandtab.diff by tomas@vdr-portal.de + http://www.vdr-portal.de/board17-developer/board25-patches/p914968-patch-f%C3%BCr-text2skin-channelnames4reruns/#post914968 2011-11-06: Version 1.3.2 diff --git a/Makefile b/Makefile index c79b520..d2241c1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ #DEBUG=1 #BENCH=1 STRIP=strip +DEVELOPMENT_FEATURES=1 # BEWARE that you can not use GraphTFT together with # Text2Skin if you use Imlib2! (That's why I actually implemented ImageMagick) diff --git a/common.c b/common.c index 5a8c9c9..a3f03fa 100644 --- a/common.c +++ b/common.c @@ -144,7 +144,7 @@ bool GetFrontendHasSignal(void) std::string AddExtInfoToDescription(const char *Title, const char *ShortText, const char *Description, const char *Aux, bool StripAux) { // max. width so lines don't get wrapped - #define MAX_CHARS 50 + #define MAX_CHARS 100 // prepare the description std::stringstream desc(""); @@ -178,9 +178,15 @@ std::string AddExtInfoToDescription(const char *Title, const char *ShortText, co list->First(); r && i < 5; r = list->Next(r)) { i++; std::stringstream buf; + cChannel *channel = Channels.GetByChannelID(r->event->ChannelID(), true, true); + if (channel) + buf << "\n"; + buf << " - "; + buf << channel->ShortName(true); buf << " - "; buf << *DayDateTime(r->event->StartTime()); - buf << ": " << r->event->Title(); + buf << " - " << r->event->Title(); + if (!isempty(r->event->ShortText())) buf << "~" << r->event->ShortText(); desc << FitToWidth(buf, MAX_CHARS) << "\n"; } diff --git a/render.c b/render.c index b22a3f8..6e271a4 100644 --- a/render.c +++ b/render.c @@ -336,7 +336,7 @@ void cText2SkinRender::DrawItemText(cxObject *Object, int i, const txPoint &List const cFont *defFont = cFont::GetFont(fontOsd); const char *dummy = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "; //if (defFont != Object->Font()) - mTabScale = 1.08 * (float)Object->Font()->Width(dummy) / (float)defFont->Width(dummy); + mTabScale = 1.4 * (float)Object->Font()->Width(dummy) / (float)defFont->Width(dummy); mTabScaleSet = true; } -- cgit v1.2.3