diff options
author | louis <louis.braun@gmx.de> | 2013-05-04 17:18:05 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-05-04 17:18:05 +0200 |
commit | 993bdf2ed543d832eebb1de158134223254dc8ee (patch) | |
tree | 81b8b7b98ff5ee3b4e31560cd768ed118e2d8af3 /displayreplay.c | |
parent | 1bfdd7c81c641cc0e782b7bf360497b060a1d39b (diff) | |
download | skin-nopacity-993bdf2ed543d832eebb1de158134223254dc8ee.tar.gz skin-nopacity-993bdf2ed543d832eebb1de158134223254dc8ee.tar.bz2 |
Implemented workaround for VDR DrawEllipse bug
Diffstat (limited to 'displayreplay.c')
-rw-r--r-- | displayreplay.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/displayreplay.c b/displayreplay.c index 7be2a46..c0cabf8 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -135,16 +135,20 @@ void cNopacityDisplayReplay::CreateFonts(void) { void cNopacityDisplayReplay::DrawBackground(void) { if (!modeOnly) { DrawBlendedBackground(pixmapHeader, Theme.Color(clrReplayBackground), Theme.Color(clrReplayBackBlend), true); - pixmapHeader->DrawEllipse(cRect(0,0, headerHeight/2, headerHeight/2), clrTransparent, -2); - pixmapHeader->DrawEllipse(cRect(width - headerHeight/2 ,0 ,headerHeight/2,headerHeight/2), clrTransparent, -1); + DrawBlendedBackground(pixmapFooter, Theme.Color(clrReplayBackground), Theme.Color(clrReplayBackBlend), false); + int cornerTopSize = headerHeight/2; + int cornerBottomSize = footerHeight/2; + if ((cornerTopSize > 2)&&(cornerBottomSize > 2)) { + pixmapHeader->DrawEllipse(cRect(0,0, cornerTopSize, cornerTopSize), clrTransparent, -2); + pixmapHeader->DrawEllipse(cRect(width - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1); + pixmapFooter->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3); + pixmapFooter->DrawEllipse(cRect(width - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4); + } pixmapBackground->Fill(Theme.Color(clrReplayBackground)); pixmapControls->Fill(clrTransparent); pixmapProgressBar->Fill(clrTransparent); pixmapScreenResolution->Fill(clrTransparent); pixmapJump->Fill(clrTransparent); - DrawBlendedBackground(pixmapFooter, Theme.Color(clrReplayBackground), Theme.Color(clrReplayBackBlend), false); - pixmapFooter->DrawEllipse(cRect(0,footerHeight/2,footerHeight/2,footerHeight/2), clrTransparent, -3); - pixmapFooter->DrawEllipse(cRect(width - footerHeight/2, footerHeight/2 ,footerHeight/2,footerHeight/2), clrTransparent, -4); } else { pixmapControls->Fill(Theme.Color(clrMenuBorder)); pixmapControls->DrawRectangle(cRect(2, 2, pixmapControls->ViewPort().Width() - 4, pixmapControls->ViewPort().Height() - 4),Theme.Color(clrReplayBackground)); @@ -290,6 +294,8 @@ void cNopacityDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { } void cNopacityDisplayReplay::SetProgress(int Current, int Total) { + if (progressBarHeight < 5) + return; int barWidth = width - 2*progressBarHeight; cProgressBar pb(barWidth, progressBarHeight-2, Current, Total, marks, Theme.Color(clrReplayProgressSeen), Theme.Color(clrReplayProgressRest), Theme.Color(clrReplayProgressSelected), Theme.Color(clrReplayProgressMark), Theme.Color(clrReplayProgressCurrent)); pixmapProgressBar->DrawEllipse(cRect(progressBarHeight/2, 0, progressBarHeight, progressBarHeight), Theme.Color(clrProgressBarBack)); |