Permalink
Browse files

Apply the MythUIShape's alpha attribute when drawing it.

This is primarily to allow osd_subtitle.xml to use the alpha attribute
in addition to or in place of the line and fill alpha attributes, when
defining subtitle backgrounds.
  • Loading branch information...
stichnot committed May 3, 2012
1 parent a08bfed commit 33705ae938d5240b9f74bb8f54b2ff8bd765ede2
Showing with 4 additions and 3 deletions.
  1. +4 −3 mythtv/libs/libmythui/mythuishape.cpp
@@ -55,6 +55,7 @@ void MythUIShape::SetLinePen(QPen pen)
void MythUIShape::DrawSelf(MythPainter *p, int xoffset, int yoffset,
int alphaMod, QRect clipRect)
{
+ int alpha = CalcAlpha(alphaMod);
QRect area = GetArea();
m_cropRect.CalculateArea(area);
@@ -64,11 +65,11 @@ void MythUIShape::DrawSelf(MythPainter *p, int xoffset, int yoffset,
area.translate(xoffset, yoffset);
if (m_type == "box")
- p->DrawRect(area, m_fillBrush, m_linePen, alphaMod);
+ p->DrawRect(area, m_fillBrush, m_linePen, alpha);
else if (m_type == "roundbox")
- p->DrawRoundRect(area, m_cornerRadius, m_fillBrush, m_linePen, alphaMod);
+ p->DrawRoundRect(area, m_cornerRadius, m_fillBrush, m_linePen, alpha);
else if (m_type == "ellipse")
- p->DrawEllipse(area, m_fillBrush, m_linePen, alphaMod);
+ p->DrawEllipse(area, m_fillBrush, m_linePen, alpha);
}
/**

0 comments on commit 33705ae

Please sign in to comment.