diff options
author | louis <louis.braun@gmx.de> | 2013-07-20 11:48:00 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-07-20 11:48:00 +0200 |
commit | 9f351151edaf8195446b591ab9ac1d43f038c7ca (patch) | |
tree | 2846eb93487807a879bd0f290cba956a8fb647e2 /recmenuitem.c | |
parent | 98a301eff519a3fcf8f77055ebaa2c1dce9bb30f (diff) | |
download | vdr-plugin-tvguide-9f351151edaf8195446b591ab9ac1d43f038c7ca.tar.gz vdr-plugin-tvguide-9f351151edaf8195446b591ab9ac1d43f038c7ca.tar.bz2 |
left alignment of folders menu
Diffstat (limited to 'recmenuitem.c')
-rw-r--r-- | recmenuitem.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/recmenuitem.c b/recmenuitem.c index eb931e9..082ec4c 100644 --- a/recmenuitem.c +++ b/recmenuitem.c @@ -46,13 +46,14 @@ void cRecMenuItem::setBackground(void) { // --- cRecMenuItemButton ------------------------------------------------------- -cRecMenuItemButton::cRecMenuItemButton(const char *text, eRecMenuState action, bool active, bool halfWidth) { +cRecMenuItemButton::cRecMenuItemButton(const char *text, eRecMenuState action, bool active, bool halfWidth, bool alignLeft) { selectable = true; this->text = text; this->action = action; this->active = active; height = 3 * font->Height() / 2; this->halfWidth = halfWidth; + this->alignLeft = alignLeft; } cRecMenuItemButton::~cRecMenuItemButton(void) { @@ -75,7 +76,11 @@ void cRecMenuItemButton::SetPixmaps(void) { void cRecMenuItemButton::Draw(void) { int y = (height - font->Height()) / 2; - int x = (width - font->Width(*text)) / 2;; + int x; + if (!alignLeft) + x = (width - font->Width(*text)) / 2; + else + x = 10; pixmap->DrawText(cPoint(x, y), *text, colorText, colorTextBack, font); } |