summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-05-04 17:18:05 +0200
committerlouis <louis.braun@gmx.de>2013-05-04 17:18:05 +0200
commit993bdf2ed543d832eebb1de158134223254dc8ee (patch)
tree81b8b7b98ff5ee3b4e31560cd768ed118e2d8af3
parent1bfdd7c81c641cc0e782b7bf360497b060a1d39b (diff)
downloadskin-nopacity-993bdf2ed543d832eebb1de158134223254dc8ee.tar.gz
skin-nopacity-993bdf2ed543d832eebb1de158134223254dc8ee.tar.bz2
Implemented workaround for VDR DrawEllipse bug
-rw-r--r--displaychannel.c40
-rw-r--r--displaymenuview.c47
-rw-r--r--displayreplay.c16
-rw-r--r--displayvolume.c15
-rw-r--r--menudetailview.c44
-rw-r--r--menuitem.c3
6 files changed, 97 insertions, 68 deletions
diff --git a/displaychannel.c b/displaychannel.c
index bdd23c8..de8ff1d 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -202,24 +202,28 @@ void cNopacityDisplayChannel::DrawBackground(void){
pixmapLogoBackground->Fill(clrTransparent);
pixmapLogoBackgroundBottom->Fill(clrTransparent);
}
-
- if ((config.backgroundStyle == bsTrans) || ((config.logoPosition == lpNone))) {
- pixmapBackgroundTop->DrawEllipse(cRect(0, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -2);
- pixmapBackgroundTop->DrawEllipse(cRect(infoWidth - channelInfoHeight/2, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -1);
- pixmapBackgroundBottom->DrawEllipse(cRect(0, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -3);
- pixmapBackgroundBottom->DrawEllipse(cRect(infoWidth - streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -4);
- } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpLeft)){
- pixmapLogoBackgroundTop->DrawEllipse(cRect(0, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -2);
- pixmapBackgroundTop->DrawEllipse(cRect(infoWidth - channelInfoHeight/2, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -1);
- pixmapLogoBackgroundBottom->DrawEllipse(cRect(0, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -3);
- pixmapBackgroundBottom->DrawEllipse(cRect(infoWidth - streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -4);
- } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpRight)){
- pixmapBackgroundTop->DrawEllipse(cRect(0, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -2);
- pixmapLogoBackgroundTop->DrawEllipse(cRect(pixmapLogoBackgroundTop->ViewPort().Width() - channelInfoHeight/2, 0, channelInfoHeight/2, channelInfoHeight/2), clrTransparent, -1);
- pixmapBackgroundBottom->DrawEllipse(cRect(0, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -3);
- pixmapLogoBackgroundBottom->DrawEllipse(cRect(pixmapLogoBackgroundBottom->ViewPort().Width() - streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2, streamInfoHeight/2), clrTransparent, -4);
+
+ int cornerTopSize = channelInfoHeight/2;
+ int cornerBottomSize = streamInfoHeight/2;
+ if ((cornerTopSize > 2)&&(cornerBottomSize > 2)) {
+ if ((config.backgroundStyle == bsTrans) || ((config.logoPosition == lpNone))) {
+ pixmapBackgroundTop->DrawEllipse(cRect(0, 0, cornerTopSize, cornerTopSize), clrTransparent, -2);
+ pixmapBackgroundTop->DrawEllipse(cRect(infoWidth - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1);
+ pixmapBackgroundBottom->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3);
+ pixmapBackgroundBottom->DrawEllipse(cRect(infoWidth - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4);
+ } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpLeft)){
+ pixmapLogoBackgroundTop->DrawEllipse(cRect(0, 0, cornerTopSize, cornerTopSize), clrTransparent, -2);
+ pixmapBackgroundTop->DrawEllipse(cRect(infoWidth - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1);
+ pixmapLogoBackgroundBottom->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3);
+ pixmapBackgroundBottom->DrawEllipse(cRect(infoWidth - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4);
+ } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpRight)){
+ pixmapBackgroundTop->DrawEllipse(cRect(0, 0, cornerTopSize, cornerTopSize), clrTransparent, -2);
+ pixmapLogoBackgroundTop->DrawEllipse(cRect(pixmapLogoBackgroundTop->ViewPort().Width() - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1);
+ pixmapBackgroundBottom->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3);
+ pixmapLogoBackgroundBottom->DrawEllipse(cRect(pixmapLogoBackgroundBottom->ViewPort().Width() - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4);
+ }
}
-
+
pixmapChannelInfo->Fill(clrTransparent);
pixmapDate->Fill(clrTransparent);
pixmapLogo->Fill(clrTransparent);
@@ -588,6 +592,8 @@ void cNopacityDisplayChannel::DrawProgressBar(int Current, int Total) {
int barHeight = pixmapProgressBar->ViewPort().Height()-8;
if (barHeight%2 != 0)
barHeight++;
+ if (barHeight < 3)
+ return;
int barFullWidth = pixmapProgressBar->ViewPort().Width() - 20 - barHeight;
double percentSeen = ((double)Current) / (double)Total;
diff --git a/displaymenuview.c b/displaymenuview.c
index 367e16b..4dcb244 100644
--- a/displaymenuview.c
+++ b/displaymenuview.c
@@ -477,12 +477,14 @@ void cNopacityDisplayMenuView::DrawBorderDecoration() {
pixmapContent->DrawRectangle(cRect(contentWidthFull, contentHeight - borderWidth, osdWidth - contentWidthMinimum, borderWidth), Theme.Color(clrMenuBorder));
//Vertical line
pixmapContent->DrawRectangle(cRect(contentWidthFull-radius, radius, borderWidth, contentHeight - 2*radius), Theme.Color(clrMenuBorder));
- //Upper Ellipse
- pixmapContent->DrawEllipse(cRect(contentWidthFull - radius, 0, radius, radius), Theme.Color(clrMenuBorder),2);
- pixmapContent->DrawEllipse(cRect(contentWidthFull - radius + borderWidth, borderWidth, radius-borderWidth, radius-borderWidth), clrTransparent, 2);
- //Lower Ellipse
- pixmapContent->DrawEllipse(cRect(contentWidthFull - radius, contentHeight - radius, radius, radius), Theme.Color(clrMenuBorder),3);
- pixmapContent->DrawEllipse(cRect(contentWidthFull - radius + borderWidth, contentHeight - radius, radius-borderWidth, radius-borderWidth), clrTransparent, 3);
+ if (radius-borderWidth > 2) {
+ //Upper Ellipse
+ pixmapContent->DrawEllipse(cRect(contentWidthFull - radius, 0, radius, radius), Theme.Color(clrMenuBorder),2);
+ pixmapContent->DrawEllipse(cRect(contentWidthFull - radius + borderWidth, borderWidth, radius-borderWidth, radius-borderWidth), clrTransparent, 2);
+ //Lower Ellipse
+ pixmapContent->DrawEllipse(cRect(contentWidthFull - radius, contentHeight - radius, radius, radius), Theme.Color(clrMenuBorder),3);
+ pixmapContent->DrawEllipse(cRect(contentWidthFull - radius + borderWidth, contentHeight - radius, radius-borderWidth, radius-borderWidth), clrTransparent, 3);
+ }
} else {
//Background
pixmapContent->DrawRectangle(cRect(osdWidth - contentWidthMinimum + radius, 0, contentWidthFull - radius, contentHeight), Theme.Color(clrMenuBack));
@@ -495,12 +497,14 @@ void cNopacityDisplayMenuView::DrawBorderDecoration() {
pixmapContent->DrawRectangle(cRect(0, contentHeight - borderWidth, osdWidth - contentWidthMinimum, borderWidth), Theme.Color(clrMenuBorder));
//Vertical line
pixmapContent->DrawRectangle(cRect(osdWidth - contentWidthMinimum + radius - borderWidth, radius, borderWidth, contentHeight - 2*radius), Theme.Color(clrMenuBorder));
- //Upper Ellipse
- pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, 0, radius, radius), Theme.Color(clrMenuBorder),1);
- pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, borderWidth, radius-borderWidth, radius-borderWidth), clrTransparent, 1);
- //Lower Ellipse
- pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, contentHeight - radius, radius, radius), Theme.Color(clrMenuBorder),4);
- pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, contentHeight - radius, radius-borderWidth, radius-borderWidth), clrTransparent, 4);
+ if (radius-borderWidth > 2) {
+ //Upper Ellipse
+ pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, 0, radius, radius), Theme.Color(clrMenuBorder),1);
+ pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, borderWidth, radius-borderWidth, radius-borderWidth), clrTransparent, 1);
+ //Lower Ellipse
+ pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, contentHeight - radius, radius, radius), Theme.Color(clrMenuBorder),4);
+ pixmapContent->DrawEllipse(cRect(osdWidth - contentWidthMinimum, contentHeight - radius, radius-borderWidth, radius-borderWidth), clrTransparent, 4);
+ }
}
}
@@ -695,18 +699,19 @@ void cNopacityDisplayMenuView::DrawButton(const char *text, int handleImage, tCo
if (config.roundedCorners) {
int radius = config.cornerRadius;
+ if (radius > 2) {
+ pixmapFooter->DrawEllipse(cRect(left,top,radius,radius), borderColor, -2);
+ pixmapFooter->DrawEllipse(cRect(left-2,top-2,radius,radius), Theme.Color(clrMenuBack), -2);
- pixmapFooter->DrawEllipse(cRect(left,top,radius,radius), borderColor, -2);
- pixmapFooter->DrawEllipse(cRect(left-2,top-2,radius,radius), Theme.Color(clrMenuBack), -2);
+ pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius, top,radius,radius), borderColor, -1);
+ pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius+2,top-2,radius,radius), Theme.Color(clrMenuBack), -1);
- pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius, top,radius,radius), borderColor, -1);
- pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius+2,top-2,radius,radius), Theme.Color(clrMenuBack), -1);
+ pixmapFooter->DrawEllipse(cRect(left,top + buttonHeight -radius,radius,radius), borderColor, -3);
+ pixmapFooter->DrawEllipse(cRect(left - 2, top + buttonHeight - radius + 2,radius,radius), Theme.Color(clrMenuBack), -3);
- pixmapFooter->DrawEllipse(cRect(left,top + buttonHeight -radius,radius,radius), borderColor, -3);
- pixmapFooter->DrawEllipse(cRect(left - 2, top + buttonHeight - radius + 2,radius,radius), Theme.Color(clrMenuBack), -3);
-
- pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius, top + buttonHeight -radius,radius,radius), borderColor, -4);
- pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius + 2, top + buttonHeight -radius + 2,radius,radius), Theme.Color(clrMenuBack), -4);
+ pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius, top + buttonHeight -radius,radius,radius), borderColor, -4);
+ pixmapFooter->DrawEllipse(cRect(left + buttonWidth -radius + 2, top + buttonHeight -radius + 2,radius,radius), Theme.Color(clrMenuBack), -4);
+ }
}
int textWidth = fontButtons->Width(text);
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));
diff --git a/displayvolume.c b/displayvolume.c
index fcb8e25..9570e1a 100644
--- a/displayvolume.c
+++ b/displayvolume.c
@@ -21,12 +21,13 @@ cNopacityDisplayVolume::cNopacityDisplayVolume(void) {
DrawBlendedBackground(pixmapBackgroundTop, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), true);
DrawBlendedBackground(pixmapBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false);
-
- pixmapBackgroundTop->DrawEllipse(cRect(0, 0, height/4, height/4), clrTransparent, -2);
- pixmapBackgroundTop->DrawEllipse(cRect(width - height/4, 0, height/4, height/4), clrTransparent, -1);
- pixmapBackgroundBottom->DrawEllipse(cRect(0, height/4, height/4, height/4), clrTransparent, -3);
- pixmapBackgroundBottom->DrawEllipse(cRect(width - height/4, height/4, height/4, height/4), clrTransparent, -4);
-
+ int cornerSize = height/4;
+ if (cornerSize > 2) {
+ pixmapBackgroundTop->DrawEllipse(cRect(0, 0, cornerSize, cornerSize), clrTransparent, -2);
+ pixmapBackgroundTop->DrawEllipse(cRect(width - cornerSize, 0, cornerSize, cornerSize), clrTransparent, -1);
+ pixmapBackgroundBottom->DrawEllipse(cRect(0, cornerSize, cornerSize, cornerSize), clrTransparent, -3);
+ pixmapBackgroundBottom->DrawEllipse(cRect(width - cornerSize, cornerSize, cornerSize, cornerSize), clrTransparent, -4);
+ }
labelHeight = height/3;
pixmapLabel = osd->CreatePixmap(2, cRect(0, 5, width, labelHeight));
progressBarWidth = 0.9 * width;
@@ -69,6 +70,8 @@ void cNopacityDisplayVolume::SetVolume(int Current, int Total, bool Mute) {
void cNopacityDisplayVolume::DrawProgressBar(int Current, int Total) {
pixmapProgressBar->Fill(clrTransparent);
+ if (progressBarHeight < 5)
+ return;
double percent = ((double)Current) / (double)Total;
int barWidth = progressBarWidth - progressBarHeight;
if ((Current > 0) || (Total > 0)) {
diff --git a/menudetailview.c b/menudetailview.c
index 968b5b3..7b104aa 100644
--- a/menudetailview.c
+++ b/menudetailview.c
@@ -199,12 +199,14 @@ void cNopacityMenuDetailEventView::DrawHeader(void) {
pixmapHeader->DrawImage(cPoint(width - config.epgImageWidth - border, (headerHeight-config.epgImageHeight)/2), imgLoader.GetImage());
if (config.roundedCorners) {
int radius = config.cornerRadius;
- int x = width - config.epgImageWidth - border;
- int y = (headerHeight-config.epgImageHeight)/2;
- pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2);
- pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1);
- pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3);
- pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4);
+ if (radius > 2) {
+ int x = width - config.epgImageWidth - border;
+ int y = (headerHeight-config.epgImageHeight)/2;
+ pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2);
+ pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1);
+ pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3);
+ pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4);
+ }
}
widthTextHeader -= config.epgImageWidth;
}
@@ -295,10 +297,12 @@ void cNopacityMenuDetailEventView::DrawEPGPictures(int height) {
pixmapContent->DrawImage(cPoint(currentX, currentY), imgLoader.GetImage());
if (config.roundedCorners) {
int radius = config.cornerRadius;
- pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2);
- pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1);
- pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3);
- pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4);
+ if (radius > 2) {
+ pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2);
+ pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1);
+ pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3);
+ pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4);
+ }
}
if (currentPicsPerLine < picsPerLine) {
currentX += config.epgImageWidthLarge + border;
@@ -413,10 +417,12 @@ void cNopacityMenuDetailRecordingView::DrawEPGPictures(int height) {
pixmapContent->DrawImage(cPoint(currentX, currentY), imgLoader.GetImage());
if (config.roundedCorners) {
int radius = config.cornerRadius;
- pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2);
- pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1);
- pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3);
- pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4);
+ if (radius > 2) {
+ pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2);
+ pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1);
+ pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3);
+ pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4);
+ }
}
if (currentPicsPerLine < picsPerLine) {
currentX += config.epgImageWidthLarge + border;
@@ -450,10 +456,12 @@ void cNopacityMenuDetailRecordingView::DrawHeader(void) {
int radius = config.cornerRadius;
int x = width - config.epgImageWidth - border;
int y = (headerHeight-config.epgImageHeight)/2;
- pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2);
- pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1);
- pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3);
- pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4);
+ if (radius > 2) {
+ pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2);
+ pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1);
+ pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3);
+ pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4);
+ }
}
widthTextHeader -= config.epgImageWidth;
}
diff --git a/menuitem.c b/menuitem.c
index c4234f7..eca200e 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -156,7 +156,8 @@ void cNopacityMenuItem::DoSleep(int duration) {
void cNopacityMenuItem::DrawRoundedCorners(tColor borderColor) {
int radius = config.cornerRadius;
-
+ if (radius < 3)
+ return;
pixmap->DrawEllipse(cRect(0,0,radius,radius), borderColor, -2);
pixmap->DrawEllipse(cRect(-1,-1,radius,radius), clrTransparent, -2);