summaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorAndreas Brugger <brougs78@gmx.net>2006-12-03 17:45:17 +0100
committerThomas Günther <tom@toms-cafe.de>2009-06-03 04:13:49 +0200
commitac64ce03ec6b5766691ff2da3af6f51ed800792a (patch)
tree11acc2de3a055ff546a1bfa5e5cdad20ab1715c7 /render.c
parent165c14206aa2e06c33ac887f9b9d0f816573a5fe (diff)
downloadvdr-plugin-text2skin-ac64ce03ec6b5766691ff2da3af6f51ed800792a.tar.gz
vdr-plugin-text2skin-ac64ce03ec6b5766691ff2da3af6f51ed800792a.tar.bz2
2006-12-03: Version 1.1-cvs_ext-0.10 (vdr-text2skin-1.1-cvs_ext-0.10.diff)brougs78-extensions
- set EditableWidth. This is important for plugins like 'rotor' or 'extrecmenu' - now setting the locale setting LC_TIME according to the language-selection in VDR
Diffstat (limited to 'render.c')
-rw-r--r--render.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/render.c b/render.c
index 4fafdbe..87df8a3 100644
--- a/render.c
+++ b/render.c
@@ -227,6 +227,7 @@ void cText2SkinRender::DrawObject(const cxObject *Object)
uint itemheight = item->Size().h;
uint maxitems = areasize.h / itemheight;
uint yoffset = 0;
+ bool initialEditableWidthSet = false;
mMenuScrollbar.maxItems = maxitems;
SetMaxItems(maxitems); //Dprintf("setmaxitems %d\n", maxitems);
@@ -262,13 +263,23 @@ void cText2SkinRender::DrawObject(const cxObject *Object)
nexttab = GetTab(n);
}
+ // set initial EditableWidth
+ // this is for plugins like 'extrecmenu' and 'rotor'
+ if ((obj.Type() == cxObject::text || obj.Type() == cxObject::marquee || obj.Type() == cxObject::blink) && !initialEditableWidthSet) {
+ initialEditableWidthSet = true;
+ SetEditableWidth(obj.Size().w);
+ }
+
if (t >= 0 && nexttab > 0 && nexttab < obj.mPos1.x + obj.Size().w - 1)
// there is a "next tab" with text
obj.mPos2.x = Object->mPos1.x + o->mPos1.x + nexttab;
else {
// there is no "next tab", use the rightmost edge
obj.mPos2.x += Object->mPos1.x;
- if (obj.Type() == cxObject::text && t == 1) {
+ /* not used anymore due to change to fontOsd
+ but could be usefull if someone uses a differnt font
+
+ if ((obj.Type() == cxObject::text || obj.Type() == cxObject::marquee || obj.Type() == cxObject::blink) && t == 1) {
// VDR assumes, that the font in the menu is fontOsd,
// so the EditableWidth is not necessarily correct
// for TTF
@@ -278,7 +289,9 @@ void cText2SkinRender::DrawObject(const cxObject *Object)
if (defFont != obj.Font())
editableWidth = (int)(editableWidth * defFont->Width(dummy) / (1.1 * obj.Font()->Width(dummy)));
SetEditableWidth(editableWidth);
- }
+ } */
+ if ((obj.Type() == cxObject::text || obj.Type() == cxObject::marquee || obj.Type() == cxObject::blink) && t == 1)
+ SetEditableWidth(obj.Size().w);
}
obj.mPos2.y += Object->mPos1.y + yoffset;