diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | displaymenuview.c | 3 | ||||
-rw-r--r-- | displaymessage.c | 13 | ||||
-rw-r--r-- | helpers.c | 15 |
4 files changed, 12 insertions, 22 deletions
@@ -324,4 +324,5 @@ Version 0.1.4 - fixed bug that progress bar sometimes was not displayed when switching - adapted the status icons for the different themes the channel - +- Cleaned up pixmaps in menuitems +- Avoided font pixelation on default menu items diff --git a/displaymenuview.c b/displaymenuview.c index 86bd875..8651ec6 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -700,11 +700,10 @@ void cNopacityDisplayMenuView::DrawMessage(eMessageType Type, const char *Text) pixmapStatus->DrawImage(cPoint(0, 0), *imgBack); } } else { + pixmapStatus->Fill(col); if (config.GetValue("displayType") == dtBlending) { cImage imgBack = imgCache->GetBackground(Theme.Color(clrMenuBack), col, geoManager->menuMessageWidth-2, geoManager->menuMessageHeight-2, true); pixmapStatus->DrawImage(cPoint(1, 1), imgBack); - } else { - pixmapStatus->Fill(col); } if (config.GetValue("roundedCorners")) { DrawRoundedCornersWithBorder(pixmapStatus, col, config.GetValue("cornerRadius"), geoManager->menuMessageWidth, geoManager->menuMessageHeight); diff --git a/displaymessage.c b/displaymessage.c index c484614..2dae835 100644 --- a/displaymessage.c +++ b/displaymessage.c @@ -51,22 +51,21 @@ void cNopacityDisplayMessage::SetMessage(eMessageType Type, const char *Text) { break; } - pixmapBackground->Fill(clrTransparent); pixmap->Fill(clrTransparent); if (config.GetValue("displayType") == dtGraphical) { + pixmapBackground->Fill(clrTransparent); cImage *imgBack = imgCache->GetSkinElement(seType); if (imgBack) { - pixmap->DrawImage(cPoint(0, 0), *imgBack); + pixmapBackground->DrawImage(cPoint(0, 0), *imgBack); } } else { + pixmapBackground->Fill(col); if (config.GetValue("displayType") == dtBlending) { cImage imgBack = imgCache->GetBackground(Theme.Color(clrMessageBlend), col, geoManager->messageWidth-2, geoManager->messageHeight-2, true); - pixmap->DrawImage(cPoint(1, 1), imgBack); - } else { - pixmap->Fill(clrTransparent); + pixmapBackground->DrawImage(cPoint(1, 1), imgBack); } if (config.GetValue("roundedCorners")) { - DrawRoundedCornersWithBorder(pixmap, col, config.GetValue("cornerRadius"), geoManager->messageWidth, geoManager->messageHeight, pixmapBackground); + DrawRoundedCornersWithBorder(pixmapBackground, col, config.GetValue("cornerRadius"), geoManager->messageWidth, geoManager->messageHeight); } } int textWidth = fontManager->messageText->Width(Text); @@ -74,7 +73,7 @@ void cNopacityDisplayMessage::SetMessage(eMessageType Type, const char *Text) { (geoManager->messageHeight - fontManager->messageText->Height()) / 2), Text, colFont, - (config.GetValue("displayType") != dtFlat)?clrTransparent:col, + clrTransparent, fontManager->messageText); if (FadeTime) Start(); @@ -48,29 +48,20 @@ static void DrawRoundedCorners(cPixmap *p, int radius, int x, int y, int width, } } -static void DrawRoundedCornersWithBorder(cPixmap *p, tColor borderColor, int radius, int width, int height, cPixmap *pBack = NULL) { +static void DrawRoundedCornersWithBorder(cPixmap *p, tColor borderColor, int radius, int width, int height) { if (radius < 3) return; p->DrawEllipse(cRect(0,0,radius,radius), borderColor, -2); p->DrawEllipse(cRect(-1,-1,radius,radius), clrTransparent, -2); - if (pBack) - pBack->DrawEllipse(cRect(-1,-1,radius,radius), clrTransparent, -2); p->DrawEllipse(cRect(width-radius,0,radius,radius), borderColor, -1); p->DrawEllipse(cRect(width-radius+1,-1,radius,radius), clrTransparent, -1); - if (pBack) - pBack->DrawEllipse(cRect(width-radius+1,-1,radius,radius), clrTransparent, -1); - + p->DrawEllipse(cRect(0,height-radius,radius,radius), borderColor, -3); p->DrawEllipse(cRect(-1,height-radius+1,radius,radius), clrTransparent, -3); - if (pBack) - pBack->DrawEllipse(cRect(-1,height-radius+1,radius,radius), clrTransparent, -3); - + p->DrawEllipse(cRect(width-radius,height-radius,radius,radius), borderColor, -4); p->DrawEllipse(cRect(width-radius+1,height-radius+1,radius,radius), clrTransparent, -4); - if (pBack) - pBack->DrawEllipse(cRect(width-radius+1,height-radius+1,radius,radius), clrTransparent, -4); - } static cSize ScaleToFit(int widthMax, int heightMax, int widthOriginal, int heightOriginal) { |