diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-23 14:05:03 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-23 14:05:03 +0100 |
commit | 8281be14801ea3feeef358d32ea88ae79d5d12d1 (patch) | |
tree | 3f0a2b26dce85b22ea7aa652672c83ddddcc1bb0 /skinlcars.c | |
parent | b833de1761235a01cc07819742533e152304261d (diff) | |
download | vdr-8281be14801ea3feeef358d32ea88ae79d5d12d1.tar.gz vdr-8281be14801ea3feeef358d32ea88ae79d5d12d1.tar.bz2 |
Fixed possible garbage in the remaining time of the LCARS replay display in case the hours change from two to one digit
Diffstat (limited to 'skinlcars.c')
-rw-r--r-- | skinlcars.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/skinlcars.c b/skinlcars.c index a28ba0e1..4550025c 100644 --- a/skinlcars.c +++ b/skinlcars.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinlcars.c 2.16 2013/01/23 13:34:12 kls Exp $ + * $Id: skinlcars.c 2.17 2013/01/23 14:00:09 kls Exp $ */ // "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures, @@ -1680,6 +1680,7 @@ private: int lineHeight; tColor frameColor; int lastCurrentWidth; + int lastTotalWidth; cString lastDate; tTrackId lastTrackId; void DrawDate(void); @@ -1705,6 +1706,7 @@ cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(bool ModeOnly) lineHeight = font->Height(); frameColor = Theme.Color(clrReplayFrameBg); lastCurrentWidth = 0; + lastTotalWidth = 0; int d = 5 * lineHeight; xp00 = 0; xp01 = xp00 + d / 2; @@ -1822,15 +1824,16 @@ void cSkinLCARSDisplayReplay::SetCurrent(const char *Current) { const cFont *font = cFont::GetFont(fontOsd); int w = font->Width(Current); - osd->DrawText(xp03, yp03 - lineHeight, Current, Theme.Color(clrReplayPosition), Theme.Color(clrBackground), font, lastCurrentWidth > w ? lastCurrentWidth : w, 0, taLeft); + osd->DrawText(xp03, yp03 - lineHeight, Current, Theme.Color(clrReplayPosition), Theme.Color(clrBackground), font, max(lastCurrentWidth, w), 0, taLeft); lastCurrentWidth = w; } void cSkinLCARSDisplayReplay::SetTotal(const char *Total) { const cFont *font = cFont::GetFont(fontOsd); - int w = font->Width(Total) + 10; - osd->DrawText(xp13 - w, yp03 - lineHeight, Total, Theme.Color(clrReplayPosition), Theme.Color(clrBackground), font, w, 0, taRight); + int w = font->Width(Total); + osd->DrawText(xp13 - w, yp03 - lineHeight, Total, Theme.Color(clrReplayPosition), Theme.Color(clrBackground), font, max(lastTotalWidth, w), 0, taRight); + lastTotalWidth = w; } void cSkinLCARSDisplayReplay::SetJump(const char *Jump) |