Permalink
Browse files

compute correct render rect for the label control - fixes #11651 (lab…

…els without <height> specified)
  • Loading branch information...
1 parent 1fb3d87 commit 1c2d0e17ab2cf0a50b33540bc5f403e9fd6d5ca4 Jonathan Marshall committed Jun 30, 2011
Showing with 6 additions and 0 deletions.
  1. +5 −0 xbmc/guilib/GUILabelControl.cpp
  2. +1 −0 xbmc/guilib/GUILabelControl.h
@@ -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();
@@ -51,6 +51,7 @@ class CGUILabelControl :
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);

0 comments on commit 1c2d0e1

Please sign in to comment.