From f1441cebf6e5b27731f7fca4835b9f49b6e2f329 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 5 Mar 2012 10:35:16 +0100 Subject: [PATCH] Improved displaying the play mode in the ST:TNG skin --- HISTORY | 1 + skinsttng.c | 14 ++++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/HISTORY b/HISTORY index ffc565d3..f269ed17 100644 --- a/HISTORY +++ b/HISTORY @@ -6972,3 +6972,4 @@ Video Disk Recorder Revision History EPG data from the transponder could be handled even though it shouldn't be handled for 10 seconds. - Added some missing member initializations in cBitmap. +- Improved displaying the play mode in the ST:TNG skin. diff --git a/skinsttng.c b/skinsttng.c index c9c3031f..b628e0bc 100644 --- a/skinsttng.c +++ b/skinsttng.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinsttng.c 2.11 2011/08/21 11:02:26 kls Exp $ + * $Id: skinsttng.c 2.12 2012/03/05 10:35:16 kls Exp $ */ // Star Trek: The Next Generation® is a registered trademark of Paramount Pictures @@ -783,9 +783,6 @@ public: virtual void Flush(void); }; -#define SymbolWidth 30 -#define SymbolHeight 30 - cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(bool ModeOnly) { const cFont *font = cFont::GetFont(fontSml); @@ -794,7 +791,7 @@ cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(bool ModeOnly) lastCurrentWidth = 0; cBitmap bm(play_xpm); x0 = 0; - x1 = max(SymbolWidth, bm.Width()); + x1 = max(lineHeight * 2, bm.Width()); x2 = x1 + Roundness; x3 = x2 + Gap; x7 = cOsd::OsdWidth(); @@ -805,7 +802,7 @@ cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(bool ModeOnly) y1 = lineHeight; y2 = y1 + Roundness; y3 = y2 + Gap; - y4 = y3 + max(SymbolHeight, bm.Height()); + y4 = y3 + max(lineHeight, bm.Height()); y5 = y4 + Gap; y6 = y5 + Roundness; y7 = y6 + font->Height(); @@ -867,10 +864,7 @@ static const char *const *ReplaySymbols[2][2][5] = { void cSkinSTTNGDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { - if (Speed < -1) - Speed = -1; - if (Speed > 3) - Speed = 3; + Speed = constrain(Speed, -1, 3); cBitmap bm(ReplaySymbols[Play][Forward][Speed + 1]); osd->DrawBitmap(x0 + (x1 - x0 - bm.Width()) / 2, y3 + (y4 - y3 - bm.Height()) / 2, bm, Theme.Color(clrReplayMode), frameColor); }