From e8609119a6d67e05cc42670ae84c4fb3f5fe2d06 Mon Sep 17 00:00:00 2001 From: louis Date: Thu, 7 Nov 2013 17:52:28 +0100 Subject: fixed a bug that rounded corners of color buttons in menus were not drawn correctly --- HISTORY | 2 ++ displaymenuview.c | 11 ++++++----- themes/nOpacity-iceblue.theme | 10 +++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/HISTORY b/HISTORY index e81223c..2118cd6 100644 --- a/HISTORY +++ b/HISTORY @@ -352,3 +352,5 @@ Version 0.1.4 (thanks @Helmut Auer) - changed channel logos in main menu timers display to scale automatically +- fixed a bug that rounded corners of color buttons in menus were + not drawn correctly diff --git a/displaymenuview.c b/displaymenuview.c index 75309fd..269e3e2 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -563,22 +563,23 @@ void cNopacityDisplayMenuView::DrawButton(const char *text, eSkinElementType seB if (image) pixmapFooter->DrawImage(cPoint(left, top), *image); } else { - pixmapFooter->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), buttonColor); + pixmapFooter->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), borderColor); + pixmapFooter->DrawRectangle(cRect(left+1, top+1, geoManager->menuButtonWidth-2, geoManager->menuButtonHeight-2), buttonColor); } if (config.GetValue("roundedCorners") && (config.GetValue("displayType") != dtGraphical)) { int radius = config.GetValue("cornerRadius"); if (radius > 2) { pixmapFooter->DrawEllipse(cRect(left,top,radius,radius), borderColor, -2); - pixmapFooter->DrawEllipse(cRect(left-2,top-2,radius,radius), clrTransparent, -2); + pixmapFooter->DrawEllipse(cRect(left-1,top-1,radius,radius), clrTransparent, -2); pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius, top,radius,radius), borderColor, -1); - pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius+2,top-2,radius,radius), clrTransparent, -1); + pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius+1,top-1,radius,radius), clrTransparent, -1); pixmapFooter->DrawEllipse(cRect(left,top + geoManager->menuButtonHeight -radius,radius,radius), borderColor, -3); - pixmapFooter->DrawEllipse(cRect(left - 2, top + geoManager->menuButtonHeight - radius + 2,radius,radius), clrTransparent, -3); + pixmapFooter->DrawEllipse(cRect(left - 1, top + geoManager->menuButtonHeight - radius + 1,radius,radius), clrTransparent, -3); pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius, top + geoManager->menuButtonHeight -radius,radius,radius), borderColor, -4); - pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius + 2, top + geoManager->menuButtonHeight -radius + 2,radius,radius), clrTransparent, -4); + pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius + 1, top + geoManager->menuButtonHeight -radius + 1,radius,radius), clrTransparent, -4); } } int textWidth = fontManager->menuButtons->Width(text); diff --git a/themes/nOpacity-iceblue.theme b/themes/nOpacity-iceblue.theme index c41727a..c6dbadf 100644 --- a/themes/nOpacity-iceblue.theme +++ b/themes/nOpacity-iceblue.theme @@ -65,16 +65,16 @@ clrProgressBarBlendHigh = DD5A8998 clrMenuTextWindow = DDFFFFFF clrMenuChannelLogoBack = 99C6C6C6 clrButtonRed = FFCC0000 -clrButtonRedBorder = FFCC0000 +clrButtonRedBorder = FF000000 clrButtonRedFont = FFFFFFFF clrButtonGreen = FF00F53D -clrButtonGreenBorder = FF00F53D +clrButtonGreenBorder = FF000000 clrButtonGreenFont = FFFFFFFF clrButtonYellow = FFF5B800 -clrButtonYellowBorder = FFF5B800 +clrButtonYellowBorder = FF000000 clrButtonYellowFont = FFFFFFFF clrButtonBlue = FF003DF5 -clrButtonBlueBorder = FF003DF5 +clrButtonBlueBorder = FF000000 clrButtonBlueFont = FFFFFFFF clrMessageFontStatus = FFFFFFFF clrMessageFontInfo = FFFFFFFF @@ -84,4 +84,4 @@ clrMessageStatus = FF003DF5 clrMessageInfo = FF00F53D clrMessageWarning = FFF5B800 clrMessageError = FFCC0000 -clrMessageBlend = FFFFFFFF \ No newline at end of file +clrMessageBlend = FFFFFFFF -- cgit v1.2.3