From 0d72175c5c99cf19a0c4de94019bca72648cfd43 Mon Sep 17 00:00:00 2001 From: jmarshallnz Date: Tue, 23 Feb 2010 10:20:09 +0000 Subject: fixed: Ensure settings spinners don't cause overlapping text by making the spin labels scroll if necessary git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28071 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- guilib/GUISpinControlEx.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'guilib/GUISpinControlEx.cpp') diff --git a/guilib/GUISpinControlEx.cpp b/guilib/GUISpinControlEx.cpp index e23bdce45b..4c5f53cebb 100644 --- a/guilib/GUISpinControlEx.cpp +++ b/guilib/GUISpinControlEx.cpp @@ -144,3 +144,12 @@ void CGUISpinControlEx::SetSpinPosition(float spinPosX) m_spinPosX = spinPosX; SetPosition(m_buttonControl.GetXPosition(), m_buttonControl.GetYPosition()); } + +void CGUISpinControlEx::RenderText(float posX, float width) +{ + const float spaceWidth = 10; + // check our limits from the button control + float x = std::max(m_buttonControl.m_label.GetRenderRect().x2 + spaceWidth, posX); + m_label.SetScrolling(HasFocus()); + CGUISpinControl::RenderText(x, width + posX - x); +} -- cgit v1.2.3