diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a729fa46..0bacdf8b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1313,6 +1313,8 @@ Reinhard Nissl for fixing a possible high CPU load when pausing replay for suggesting that the LCARS skin should only displays devices that can actually receive channels + for reporting that the Transfer Mode indicator bitmap in the LCARS skin may not + fit with small font sizes Richard Robson for reporting freezing replay if a timer starts while in Transfer Mode from the diff --git a/HISTORY b/HISTORY index ca76fe9c..74c07b2e 100644 --- a/HISTORY +++ b/HISTORY @@ -7155,3 +7155,5 @@ Video Disk Recorder Revision History - Fixed the background color of the Transfer Mode indicator bitmap in the LCARS skin. - The LCARS skin now only displays devices that can actually receive channels, leaving out, for instance, pure replay devices (suggested by Reinhard Nissl). +- Now scaling down the Transfer Mode indicator bitmap in the LCARS skin in case it + doesn't fit with the selected font size (reported by Reinhard Nissl). diff --git a/skinlcars.c b/skinlcars.c index 60978f76..49a499b0 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.4 2012/06/04 08:05:03 kls Exp $ + * $Id: skinlcars.c 2.5 2012/06/04 08:53:57 kls Exp $ */ // "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures, @@ -1254,8 +1254,21 @@ void cSkinLCARSDisplayMenu::DrawLiveIndicator(void) tColor ColorBg = Theme.Color(clrChannelFrameBg); osd->DrawRectangle(xs12, y, xs12 + lineHeight / 2 - 1, y + lineHeight - 1, ColorBg); osd->DrawEllipse (xs12 + lineHeight / 2, y, xs13 - 1, y + lineHeight - 1, ColorBg, 5); - if (Transferring) - osd->DrawBitmap((xs12 + xs13 - bmTransferMode.Width()) / 2, y + (lineHeight - bmTransferMode.Height()) / 2, bmTransferMode, Theme.Color(clrChannelFrameFg), ColorBg); + if (Transferring) { + int w = bmTransferMode.Width(); + int h = bmTransferMode.Height(); + int b = w * w + h * h; // the diagonal of the bitmap (squared) + int c = lineHeight * lineHeight; // the diameter of the circle (squared) + const cBitmap *bm = &bmTransferMode; + if (b > c) { + // the bitmap doesn't fit, so scale it down: + double f = sqrt(double(c) / (2 * b)); + bm = bmTransferMode.Scaled(f, f); + } + osd->DrawBitmap((xs12 + xs13 - bm->Width()) / 2, y + (lineHeight - bm->Height()) / 2, *bm, Theme.Color(clrChannelFrameFg), ColorBg); + if (bm != &bmTransferMode) + delete bm; + } } lastLiveIndicatorY = y; lastLiveIndicatorTransferring = Transferring;