diff options
author | Andreas Brugger <brougs78@gmx.net> | 2006-11-19 16:58:14 +0100 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-06-03 03:35:58 +0200 |
commit | 74a5cc8e14900d48386e33cb576f154a6dd7e557 (patch) | |
tree | c7a90ba2fc5952558f6d4f528f94f8057f0d3ecd /render.c | |
parent | 8d32cf88bbe5b69a2710029cdaa896470a0fe20c (diff) | |
download | vdr-plugin-text2skin-74a5cc8e14900d48386e33cb576f154a6dd7e557.tar.gz vdr-plugin-text2skin-74a5cc8e14900d48386e33cb576f154a6dd7e557.tar.bz2 |
2006-11-19: Version 1.1-cvs_ext-0.9 (vdr-text2skin-1.1-cvs_ext-0.9.diff)
- added a test-feature to search for reruns of a program and add the
information to the extended epg-info (trigger DEVELOPMENT_FEATURES).
This uses a service-interface of the epgsearch-plugin
"Epgsearch-searchresults-v1.0"
- the timer-conflicts are now checked with epgsearch (service-interface
"Epgsearch-lastconflictinfo-v1.0", as it works more reliable and is
supported by the plugin author
- the extended epg-info and the recording-info are extended by AUX-Infos
(configurable)
there is also an option to strip known tags
- the tab-widths are scaled for taking into account that different TT-Fonts
have a different width than the default font from VDR
- added tokens for signal-info:
FrontendSTR, FrontendSNR, FrontendHasLock, FrontendHasSignal
- changed token TimerConflict to TimerConflicts
- added token PresentEventID for EPG-images
- added tokens for recordings:
RecordingFilename, RecordingPriority, RecordingLifetime
- removed Text2skin.diff from the rotor-plugin
Diffstat (limited to 'render.c')
-rw-r--r-- | render.c | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -145,15 +145,22 @@ void cText2SkinRender::Action(void) void cText2SkinRender::Update(void) { + //DStartBench(malen); + //DStartBench(ges); Dbench(update); for (uint i = 0; i < mDisplay->Objects(); ++i) DrawObject(mDisplay->GetObject(i)); + //DShowBench("---\t", malen); + //DStartBench(flushen); Dbench(flush); mScreen->Flush(); Ddiff("flush only", flush); Ddiff("complete flush", update); + //DShowBench("===\t", flushen); + //DShowBench("=== ges\t", ges); + //printf("====\t%d\n", mDisplay->Objects()); } void cText2SkinRender::DrawObject(const cxObject *Object) @@ -262,8 +269,17 @@ void cText2SkinRender::DrawObject(const cxObject *Object) else { // there is no "next tab", use the rightmost edge obj.mPos2.x += Object->mPos1.x; - SetEditableWidth(obj.Size().w); - //printf("EditableWidth von '%s': %d Pixels\n", obj.Text().c_str(), obj.Size().w); + if (obj.Type() == cxObject::text && t == 1) { + // VDR assumes, that the font in the menu is fontOsd, + // so the EditableWidth is not necessarily correct + // for TTF + const cFont *defFont = cFont::GetFont(fontOsd); + const char *dummy = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "; + int editableWidth = obj.Size().w; + if (defFont != obj.Font()) + editableWidth = (int)(editableWidth * defFont->Width(dummy) / (1.1 * obj.Font()->Width(dummy))); + SetEditableWidth(editableWidth); + } } obj.mPos2.y += Object->mPos1.y + yoffset; @@ -610,7 +626,9 @@ bool cText2SkinRender::ItemColor(const std::string &Color, tColor &Result) std::string cText2SkinRender::ImagePath(const std::string &Filename) { if (mRender) - return mRender->mBasePath + "/" + Filename; + return (*Filename.data() == '/') + ? Filename + : mRender->mBasePath + "/" + Filename; return ""; } |