Permalink
Browse files

MythUI: make initiator an attribute of <minsize> instead of it's own …

…element.
  • Loading branch information...
1 parent 4bc6b75 commit 490d13b78e34d6ab75e37423c3685c153d328f76 @jpoet jpoet committed May 30, 2011
Showing with 4 additions and 5 deletions.
  1. +4 −5 mythtv/libs/libmythui/mythuitype.cpp
View
9 mythtv/libs/libmythui/mythuitype.cpp
@@ -674,7 +674,7 @@ void MythUIType::SetMinAreaParent(MythRect actual_area, MythRect allowed_area,
void MythUIType::SetMinArea(const QSize &size)
{
// If a minsize is not set, don't use MinArea
- if (!m_MinSize.isValid())
+ if (!m_Initiator || !m_MinSize.isValid())
return;
m_MinArea.setWidth(0);
@@ -921,6 +921,7 @@ void MythUIType::CopyFrom(MythUIType *base)
SetArea(base->m_Area);
m_MinArea = base->m_MinArea;
m_MinSize = base->m_MinSize;
+ m_Initiator = base->m_Initiator;
m_NormalSize = base->m_NormalSize;
m_Alpha = base->m_Alpha;
m_AlphaChangeMode = base->m_AlphaChangeMode;
@@ -972,12 +973,10 @@ bool MythUIType::ParseElement(
else if (element.tagName() == "minsize")
{
// Use parsePoint so percentages can be used
+ if (element.hasAttribute("initiator"))
+ m_Initiator = parseBool(element.attribute("initiator"));
SetMinSize(parsePoint(element));
}
- else if (element.tagName() == "initiator")
- {
- m_Initiator = parseBool(element);
- }
else if (element.tagName() == "alpha")
{
m_Alpha = getFirstText(element).toInt();

0 comments on commit 490d13b

Please sign in to comment.