Skip to content

Commit

Permalink
Allow <minsize> to be used with nested siblings.
Browse files Browse the repository at this point in the history
For example, allow a textarea size to impact the size of a shape nested
inside a statetype.
  • Loading branch information
jpoet committed Jun 22, 2011
1 parent 5ff3b8b commit 132dddd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mythtv/libs/libmythui/mythuitype.cpp
Expand Up @@ -588,6 +588,14 @@ void MythUIType::AdjustMinArea(int delta_x, int delta_y)
m_MinArea.setWidth(bound.width());
m_MinArea.setHeight(bound.height());
m_Vanished = false;

QList<MythUIType*>::iterator it;

for (it = m_ChildrenList.begin(); it != m_ChildrenList.end(); ++it)
{
if (!(*it)->m_Initiator)
(*it)->AdjustMinArea(delta_x, delta_y);
}
}

void MythUIType::VanishSibling(void)
Expand All @@ -600,6 +608,14 @@ void MythUIType::VanishSibling(void)
m_MinArea.setWidth(0);
m_MinArea.setHeight(0);
m_Vanished = true;

QList<MythUIType*>::iterator it;

for (it = m_ChildrenList.begin(); it != m_ChildrenList.end(); ++it)
{
if (!(*it)->m_Initiator)
(*it)->VanishSibling();
}
}

/**
Expand Down

0 comments on commit 132dddd

Please sign in to comment.