Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 33705ae938d5240b9f74bb8f54b2ff8bd765ede2 1 parent a08bfed
@stichnot stichnot authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 mythtv/libs/libmythui/mythuishape.cpp
View
7 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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.