Skip to content
Browse files

Allow <minsize> to be used with nested siblings.

For example, allow a textarea size to impact the size of a shape nested
inside a statetype.
  • Loading branch information...
1 parent 5ff3b8b commit 132dddd3d0c22710f20773feeabf8a3fb2392d84 @jpoet jpoet committed Jun 22, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 mythtv/libs/libmythui/mythuitype.cpp
View
16 mythtv/libs/libmythui/mythuitype.cpp
@@ -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)
@@ -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();
+ }
}
/**

0 comments on commit 132dddd

Please sign in to comment.
Something went wrong with that request. Please try again.