Skip to content

Commit

Permalink
Apply the MythUIShape's alpha attribute when drawing it.
Browse files Browse the repository at this point in the history
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 33705ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mythtv/libs/libmythui/mythuishape.cpp
Expand Up @@ -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);

Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 33705ae

Please sign in to comment.