From 672ec8b7e10375d178c4803c958c49e816fd673e Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Sun, 1 Sep 2013 13:49:00 +0200 Subject: fixes in SetItem --- HISTORY | 2 ++ Makefile | 4 ++-- config.c | 4 ++-- config.h | 3 ++- displaymenu.c | 8 +++++--- displayvolume.c | 3 ++- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/HISTORY b/HISTORY index 91387ad..1dfcc8a 100644 --- a/HISTORY +++ b/HISTORY @@ -3,6 +3,8 @@ VDR Plugin 'skinflat' Revision History 2013-XX-XX: Version 0.1.1 - [add] show disk usage in topbar @ menu recordings & timer +- [update] diplay message - position at bottom of screen +- [update] Makefile, imageloader - use ResourceDirectory instead of ConfigDirectory 2013-09-08: Version 0.1.0 - [add] parameter to set channel logos path (-l --logo) diff --git a/Makefile b/Makefile index 015ae19..d9a0dd6 100644 --- a/Makefile +++ b/Makefile @@ -116,8 +116,8 @@ install-themes: cp themes/* $(DESTDIR)$(VDRCONFDIR)/themes install-icons: - mkdir -p $(DESTDIR)$(VDRCONFDIR)/plugins/$(PLUGIN)/icons - cp -r icons/* $(DESTDIR)$(VDRCONFDIR)/plugins/$(PLUGIN)/icons + mkdir -p $(DESTDIR)$(PLGRESDIR)/icons + cp -r icons/* $(DESTDIR)$(PLGRESDIR)/icons install: install-lib install-i18n install-themes install-icons diff --git a/config.c b/config.c index b16c363..4733368 100644 --- a/config.c +++ b/config.c @@ -11,10 +11,10 @@ cFlatConfig::~cFlatConfig(void) { void cFlatConfig::Init(void) { if( !strcmp(logoPath, "") ) - logoPath = cString::sprintf("%s/logos/", PLUGINPATH); + logoPath = cString::sprintf("%s/logos/", PLUGINRESOURCEPATH); dsyslog("skinflat: logopath: %s", *logoPath); if( !strcmp(iconPath, "") ) - iconPath = cString::sprintf("%s/icons/", PLUGINPATH); + iconPath = cString::sprintf("%s/icons/", PLUGINRESOURCEPATH); dsyslog("skinflat: iconPath: %s", *iconPath); } diff --git a/config.h b/config.h index acedde0..98562d5 100644 --- a/config.h +++ b/config.h @@ -6,7 +6,8 @@ #include #include "flat.h" -#define PLUGINPATH (cPlugin::ConfigDirectory(PLUGIN_NAME_I18N)) +#define PLUGINCONFIGPATH (cPlugin::ConfigDirectory(PLUGIN_NAME_I18N)) +#define PLUGINRESOURCEPATH (cPlugin::ResourceDirectory(PLUGIN_NAME_I18N)) class cFlatConfig { diff --git a/displaymenu.c b/displaymenu.c index d7faaaa..e8493a2 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -79,9 +79,9 @@ int cFlatDisplayMenu::MaxItems(void) { int cFlatDisplayMenu::ItemsHeight(void) { if( menuCategory == mcChannel ) - return MaxItems() * itemChannelHeight; + return MaxItems() * itemChannelHeight -2; - return MaxItems() * itemHeight; + return MaxItems() * itemHeight -2; } void cFlatDisplayMenu::Clear(void) { @@ -138,11 +138,13 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S const char *s = GetTabbedText(Text, i); if (s) { int xt = Tab(i); - menuPixmap->DrawText(cPoint(xt, y), s, ColorFg, ColorBg, font, menuWidth); + menuPixmap->DrawText(cPoint(xt, y), s, ColorFg, ColorBg, font, menuWidth - xt); } if (!Tab(i + 1)) break; } + + SetEditableWidth(menuWidth - Tab(1)); } /* diff --git a/displayvolume.c b/displayvolume.c index 2c9ce51..ee48f90 100644 --- a/displayvolume.c +++ b/displayvolume.c @@ -7,7 +7,8 @@ cFlatDisplayVolume::cFlatDisplayVolume(void) { CreateFullOsd(); TopBarCreate(); - int width = osdWidth / 4 * 3; + + int width = osdWidth /4*3; int left = osdWidth - width; left /= 2; -- cgit v1.2.3