Skip to content

Commit

Permalink
libmythui: Fix rendering of MythUIEditBar
Browse files Browse the repository at this point in the history
Some cropping adjustments were lost when the painter classes where re-factored and MythUIShape rendering was moved into the painters.

Closes #9674.

Signed-off-by: Mark Kendall <mkendall@mythtv.org>
  • Loading branch information
stichnot authored and Mark Kendall committed Mar 28, 2011
1 parent a640aaa commit 95a9b5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuieditbar.cpp
Expand Up @@ -188,9 +188,9 @@ void MythUIEditBar::AddBar(MythUIShape *shape, MythUIImage *image,
MythUIShape *shape = dynamic_cast<MythUIShape*>(add);
MythUIImage *image = dynamic_cast<MythUIImage*>(add);
if (shape)
shape->SetCropRect(area.left(), 0, area.width(), area.height());
shape->SetCropRect(area.left(), area.top(), area.width(), area.height());
if (image)
image->SetCropRect(area.left(), 0, area.width(), area.height());
image->SetCropRect(area.left(), area.top(), area.width(), area.height());
add->SetPosition(area.left(), area.top());
}
}
Expand Down
3 changes: 3 additions & 0 deletions mythtv/libs/libmythui/mythuishape.cpp
Expand Up @@ -56,6 +56,9 @@ void MythUIShape::DrawSelf(MythPainter *p, int xoffset, int yoffset,
int alphaMod, QRect clipRect)
{
QRect area = GetArea();
m_cropRect.CalculateArea(area);
if (!m_cropRect.isEmpty())
area &= m_cropRect.toQRect();
area.translate(xoffset, yoffset);

if (m_type == "box")
Expand Down

0 comments on commit 95a9b5d

Please sign in to comment.