summaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-26 13:30:31 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-26 13:30:31 +0200
commitbe618b6537f21ad608638067c2ac6606919e67a3 (patch)
treeced8f0503cac6021e0688b338d7aa7935bb8bab9 /render.c
parent6ab0fcd425e0e54a04e12e3a61f5555c81b9ec25 (diff)
downloadvdr-plugin-text2skin-be618b6537f21ad608638067c2ac6606919e67a3.tar.gz
vdr-plugin-text2skin-be618b6537f21ad608638067c2ac6606919e67a3.tar.bz2
Make tab width configurable.
Diffstat (limited to 'render.c')
-rw-r--r--render.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render.c b/render.c
index 2a73adb..309c4b6 100644
--- a/render.c
+++ b/render.c
@@ -5,6 +5,7 @@
#include "i18n.h"
#include "theme.h"
#include "bitmap.h"
+#include "setup.h"
#include "status.h"
#include "screen.h"
#include "display.h"
@@ -336,7 +337,10 @@ 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.4 * (float)Object->Font()->Width(dummy) / (float)defFont->Width(dummy);
+ if (Text2SkinSetup.TabWidth)
+ mTabScale = 1.4 * (float)Object->Font()->Width(dummy) / (float)defFont->Width(dummy);
+ else
+ mTabScale = 1.08 * (float)Object->Font()->Width(dummy) / (float)defFont->Width(dummy);
mTabScaleSet = true;
}