aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIButtonControl.cpp
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-02-23 10:18:45 +0000
committerjmarshallnz <jmarshallnz@svn>2010-02-23 10:18:45 +0000
commit8157c7d1ea4bdfd68c7643fae0b308ed67635cdf (patch)
tree548a712f0eef7a16bf8ed9de0c3d45886faccff2 /guilib/GUIButtonControl.cpp
parentc656f73eb9cb72e000ad3f2fc781ac738a197468 (diff)
fixed: Ensure button labels don't overlap. They will scroll if required.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28069 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIButtonControl.cpp')
-rw-r--r--guilib/GUIButtonControl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/guilib/GUIButtonControl.cpp b/guilib/GUIButtonControl.cpp
index 2ed3c5ef2d..4c7690d061 100644
--- a/guilib/GUIButtonControl.cpp
+++ b/guilib/GUIButtonControl.cpp
@@ -100,6 +100,7 @@ void CGUIButtonControl::RenderText()
{
m_label.SetMaxRect(m_posX, m_posY, m_width, m_height);
m_label.SetText(m_info.GetLabel(m_parentID));
+ m_label.SetScrolling(HasFocus());
// render the second label if it exists
CStdString label2(m_info2.GetLabel(m_parentID));
@@ -108,10 +109,9 @@ void CGUIButtonControl::RenderText()
m_label2.SetMaxRect(m_posX, m_posY, m_width, m_height);
m_label2.SetText(label2);
m_label2.SetAlign(XBFONT_RIGHT | (m_label.GetLabelInfo().align & XBFONT_CENTER_Y) | XBFONT_TRUNCATED);
+ m_label2.SetScrolling(HasFocus());
- // TODO: call a function to compute the "best" render rect from these two
- CRect leftLabel(m_label.GetRenderRect());
- CRect rightLabel(m_label2.GetRenderRect());
+ CGUILabel::CheckAndCorrectOverlap(m_label, m_label2);
m_label2.SetColor(GetTextColor());
m_label2.Render();