aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marshall <jmarshall@never.you.mind>2011-06-30 14:15:15 +1200
committerJonathan Marshall <jmarshall@never.you.mind>2011-06-30 14:15:15 +1200
commit1c2d0e17ab2cf0a50b33540bc5f403e9fd6d5ca4 (patch)
treeed3fdfda97841696c30da2fb763d353f865e2a4a
parent1fb3d8754b9c50e9a055285381df2a2cd1b4ce5a (diff)
compute correct render rect for the label control - fixes #11651 (labels without <height> specified)
-rw-r--r--xbmc/guilib/GUILabelControl.cpp5
-rw-r--r--xbmc/guilib/GUILabelControl.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/xbmc/guilib/GUILabelControl.cpp b/xbmc/guilib/GUILabelControl.cpp
index 17c4633f19..af7e39fa29 100644
--- a/xbmc/guilib/GUILabelControl.cpp
+++ b/xbmc/guilib/GUILabelControl.cpp
@@ -123,6 +123,11 @@ void CGUILabelControl::Process(unsigned int currentTime, CDirtyRegionList &dirty
CGUIControl::Process(currentTime, dirtyregions);
}
+CRect CGUILabelControl::CalcRenderRegion() const
+{
+ return m_label.GetRenderRect();
+}
+
void CGUILabelControl::Render()
{
m_label.Render();
diff --git a/xbmc/guilib/GUILabelControl.h b/xbmc/guilib/GUILabelControl.h
index cf6780511a..cd0222bbdd 100644
--- a/xbmc/guilib/GUILabelControl.h
+++ b/xbmc/guilib/GUILabelControl.h
@@ -51,6 +51,7 @@ public:
virtual bool OnMessage(CGUIMessage& message);
virtual CStdString GetDescription() const;
virtual float GetWidth() const;
+ virtual CRect CalcRenderRegion() const;
const CLabelInfo& GetLabelInfo() const { return m_label.GetLabelInfo(); };
void SetLabel(const std::string &strLabel);