diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-06-03 13:21:33 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-06-03 13:21:33 +0200 |
commit | 9966e03e2925622557d05d49f6bbf76a382fe9b8 (patch) | |
tree | 4d065ad25cff0a267203991edbdf471dfa6ccc8a /menuitems.c | |
parent | a12a504fad29ce7b9d4bfa7a81aafad07d92fde0 (diff) | |
download | vdr-9966e03e2925622557d05d49f6bbf76a382fe9b8.tar.gz vdr-9966e03e2925622557d05d49f6bbf76a382fe9b8.tar.bz2 |
Fixed handling tabbed item display in 'skincurses'
Diffstat (limited to 'menuitems.c')
-rw-r--r-- | menuitems.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/menuitems.c b/menuitems.c index 1bca4873..517664c7 100644 --- a/menuitems.c +++ b/menuitems.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.c 1.44 2006/04/25 15:59:02 kls Exp $ + * $Id: menuitems.c 1.45 2006/06/03 13:20:01 kls Exp $ */ #include "menuitems.h" @@ -296,7 +296,10 @@ void cMenuEditStrItem::Set(void) char buf[1000]; if (InEditMode()) { - const cFont *font = cFont::GetFont(fontOsd); + // This is an ugly hack to make editing strings work with the 'skincurses' plugin. + const cFont *font = dynamic_cast<cSkinDisplayMenu *>(cSkinDisplay::Current())->GetTextAreaFont(false); + if (!font || font->Width("W") != 1) // all characters have with == 1 in the font used by 'skincurses' + font = cFont::GetFont(fontOsd); strncpy(buf, value, pos); snprintf(buf + pos, sizeof(buf) - pos - 2, insert && newchar ? "[]%c%s" : "[%c]%s", *(value + pos), value + pos + 1); int width = cSkinDisplay::Current()->EditableWidth(); |