summaryrefslogtreecommitdiff
path: root/skins.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-06-06 15:20:40 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2009-06-06 15:20:40 +0200
commit82ed7c1723e246ed5fbf77a2347b0185f34fa9f3 (patch)
tree111d6016bb42886eb0cc69f0f6a4e737ce119e3b /skins.c
parentabd5a81c897ae6b4c09b68742bf9f396155d1eb2 (diff)
downloadvdr-82ed7c1723e246ed5fbf77a2347b0185f34fa9f3.tar.gz
vdr-82ed7c1723e246ed5fbf77a2347b0185f34fa9f3.tar.bz2
Fixed calculating menu colum widths in case the font has a size other than the default size
Diffstat (limited to 'skins.c')
-rw-r--r--skins.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/skins.c b/skins.c
index 46a858cf..a0815e26 100644
--- a/skins.c
+++ b/skins.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skins.c 1.14 2008/02/17 11:31:09 kls Exp $
+ * $Id: skins.c 2.1 2009/06/06 15:12:31 kls Exp $
*/
#include "skins.h"
@@ -78,8 +78,9 @@ void cSkinDisplayMenu::SetTabs(int Tab1, int Tab2, int Tab3, int Tab4, int Tab5)
tabs[3] = Tab3 ? tabs[2] + Tab3 : 0;
tabs[4] = Tab4 ? tabs[3] + Tab4 : 0;
tabs[5] = Tab5 ? tabs[4] + Tab5 : 0;
+ int AvgCharWidth = Setup.FontOsdSize * 3 / 5; // just an estimate
for (int i = 1; i < MaxTabs; i++)
- tabs[i] *= 12;//XXX average character width of font used for items - see also skincurses.c!!!
+ tabs[i] *= AvgCharWidth;
}
void cSkinDisplayMenu::Scroll(bool Up, bool Page)