diff options
Diffstat (limited to 'guilib/GUIListGroup.cpp')
-rw-r--r-- | guilib/GUIListGroup.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/guilib/GUIListGroup.cpp b/guilib/GUIListGroup.cpp index 215e2212f2..c27a6dbf62 100644 --- a/guilib/GUIListGroup.cpp +++ b/guilib/GUIListGroup.cpp @@ -111,6 +111,50 @@ void CGUIListGroup::UpdateInfo(const CGUIListItem *item) } } +void CGUIListGroup::EnlargeWidth(float difference) +{ + // Alters the width of the controls that have an ID of 1 + for (iControls it = m_children.begin(); it != m_children.end(); it++) + { + CGUIControl *child = *it; + if (child->GetID() >= 1 && child->GetID() <= 14) + { + if (child->GetID() == 1) // label + { + child->SetWidth(child->GetWidth() + difference - 10); + child->SetVisible(child->GetWidth() > 10); /// + } + else + { + child->SetWidth(child->GetWidth() + difference); + } + } + } + SetInvalid(); +} + +void CGUIListGroup::EnlargeHeight(float difference) +{ + // Alters the width of the controls that have an ID of 1 + for (iControls it = m_children.begin(); it != m_children.end(); it++) + { + CGUIControl *child = *it; + if (child->GetID() >= 1 && child->GetID() <= 14) + { + if (child->GetID() == 1) // label + { + child->SetHeight(child->GetHeight() + difference); + child->SetVisible(child->GetHeight() > 10); /// + } + else + { + child->SetHeight(child->GetHeight() + difference); + } + } + } + SetInvalid(); +} + void CGUIListGroup::SetFocusedItem(unsigned int focus) { for (iControls it = m_children.begin(); it != m_children.end(); it++) |