summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Morgan <smorgan@mythtv.org>2011-01-31 13:47:07 (GMT)
committer Stuart Morgan <smorgan@mythtv.org>2011-01-31 13:47:07 (GMT)
commitb25ec2ebee9bfebf7d148b03c70c6912635d91e4 (patch)
treed4e4f15ff39bcf989272073de5fe5e13821dfd31
parent746ec9e11ff1e936916a82e3d402fc57b3112231 (diff)
Use ExpandArea() instead of custom and flawed code to achieve the same in MythUIStateType. Potentially fixes a few drawing bugs.
-rw-r--r--mythtv/libs/libmythui/mythuistatetype.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/mythtv/libs/libmythui/mythuistatetype.cpp b/mythtv/libs/libmythui/mythuistatetype.cpp
index f8ba6a6..02961e2 100644
--- a/mythtv/libs/libmythui/mythuistatetype.cpp
+++ b/mythtv/libs/libmythui/mythuistatetype.cpp
@@ -51,12 +51,7 @@ bool MythUIStateType::AddObject(const QString &name, MythUIType *object)
else
objectArea.CalculateArea(GetMythMainWindow()->GetUIScreenRect());
- if (objectArea.width() > m_Area.width() ||
- objectArea.height() > m_Area.height())
- {
- m_Area.setWidth(objectArea.getWidth());
- m_Area.setHeight(objectArea.getHeight());
- }
+ ExpandArea(objectArea);
return true;
}
@@ -88,12 +83,7 @@ bool MythUIStateType::AddObject(StateType type, MythUIType *object)
else
objectArea.CalculateArea(GetMythMainWindow()->GetUIScreenRect());
- if (objectArea.width() > m_Area.width() ||
- objectArea.height() > m_Area.height())
- {
- m_Area.setWidth(objectArea.getWidth());
- m_Area.setHeight(objectArea.getHeight());
- }
+ ExpandArea(objectArea);
return true;
}
@@ -104,7 +94,7 @@ bool MythUIStateType::DisplayState(const QString &name)
return false;
MythUIType *old = m_CurrentState;
-
+
QMap<QString, MythUIType *>::Iterator i = m_ObjectsByName.find(name.toLower());
if (i != m_ObjectsByName.end())
m_CurrentState = i.value();