summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-05-30 19:35:42 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-05-30 19:35:42 +0200
commitc50775492c0b1d3da71283572a755d9aec3b202a (patch)
tree8749fb8d9cd4688afce3cb1dda21d97f0bedda03
parent2e5ecb5d9894cfd42f9117014fded3250eeb3688 (diff)
downloadskin-flatplus-c50775492c0b1d3da71283572a755d9aec3b202a.tar.gz
skin-flatplus-c50775492c0b1d3da71283572a755d9aec3b202a.tar.bz2
fix cut text on tab size
-rw-r--r--HISTORY1
-rw-r--r--displaymenu.c13
2 files changed, 9 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index f8e2d689..fab0ba19 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5,6 +5,7 @@ VDR Plugin 'skinflatplus' Revision History
- [fix] epg image position on channel info
- [fix] Bug #1847 - SetRecording border with deleteresume.patch
- [fix] test if decor-files are installed in setup
+- [fix] cut text on tab size
- [update] tvsraper service api. ! Use only with new TVScraper Version 0.2.0 or greater !
- [update] crypted.png
- [update] use 10_rect_sml.decor as default
diff --git a/displaymenu.c b/displaymenu.c
index b199b37a..eeecd522 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -316,6 +316,9 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S
bool isRunning = false;
int xt = Tab(i);
+ int xt2 = Tab(i+1);
+ if( xt2 == 0 || i == MaxTabs )
+ xt2 = menuItemWidth;
if( xt >= menuItemWidth )
continue;
@@ -437,19 +440,19 @@ void cFlatDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool S
menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), first.c_str(), ColorFg, ColorBg, font);
int l = font->Width( first.c_str() );
- menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize + l, y), second.c_str(), ColorExtraTextFg, ColorBg, font);
+ menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize + l, y), second.c_str(), ColorExtraTextFg, ColorBg, font, xt2 - xt);
} else if ( found2 != string::npos ) {
std::string first = tilde.substr(0, found2);
std::string second = tilde.substr(found2 +1, tilde.length() );
- menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), first.c_str(), ColorFg, ColorBg, font);
+ menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), first.c_str(), ColorFg, ColorBg, font, xt2 - xt);
int l = font->Width( first.c_str() );
l += font->Width("X");
- menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize + l, y), second.c_str(), ColorExtraTextFg, ColorBg, font);
+ menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize + l, y), second.c_str(), ColorExtraTextFg, ColorBg, font, xt2 - xt);
} else
- menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), s, ColorFg, ColorBg, font);
+ menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), s, ColorFg, ColorBg, font, xt2 - xt);
} else
- menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), s, ColorFg, ColorBg, font);
+ menuPixmap->DrawText(cPoint(xt + Config.decorBorderMenuItemSize, y), s, ColorFg, ColorBg, font, xt2 - xt);
}
}
}