summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-01-23 14:05:03 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2013-01-23 14:05:03 +0100
commit8281be14801ea3feeef358d32ea88ae79d5d12d1 (patch)
tree3f0a2b26dce85b22ea7aa652672c83ddddcc1bb0
parentb833de1761235a01cc07819742533e152304261d (diff)
downloadvdr-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
-rw-r--r--HISTORY2
-rw-r--r--skinlcars.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 4b3b6a72..90acc56e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7539,3 +7539,5 @@ Video Disk Recorder Revision History
- Now also using FindHeader() in cMpeg2Fixer::AdjTref() (pointed out by Sören Moch).
- Added missing template for DVBDIR to Make.config.template (reported by Derek Kelly).
- The LCARS menu now also works if the OSD has only 1bpp (two colors).
+- Fixed possible garbage in the remaining time of the LCARS replay display in case the
+ hours change from two to one digit.
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)