diff options
author | jmarshallnz <jmarshallnz@svn> | 2010-08-28 04:43:11 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2010-08-28 04:43:11 +0000 |
commit | 35cd2d1414568cf9eda6722732993e4563f387db (patch) | |
tree | 0feba6a4e522cd59622411b38dea78e2b1249dc2 /guilib/GUILabelControl.cpp | |
parent | c2adb1ac2f404c6b864baae81f686bcb23ae497f (diff) |
fixed: Ensure ShortenPath is done at render time rather than during FrameMove, as it requires our scaling to be setup. Fixes #10003.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33255 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUILabelControl.cpp')
-rw-r--r-- | guilib/GUILabelControl.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/guilib/GUILabelControl.cpp b/guilib/GUILabelControl.cpp index 773db08da7..f7e53b3ce4 100644 --- a/guilib/GUILabelControl.cpp +++ b/guilib/GUILabelControl.cpp @@ -91,6 +91,8 @@ void CGUILabelControl::UpdateInfo(const CGUIListItem *item) label.Mid(m_startHighlight, m_endHighlight - m_startHighlight), (color_t)m_label.GetLabelInfo().disabledColor, label.Mid(m_endHighlight)); label = colorLabel; } + else if (m_bHasPath) + label = ShortenPath(label); m_label.SetMaxRect(m_posX, m_posY, m_width, m_height); m_label.SetText(label); @@ -112,11 +114,7 @@ bool CGUILabelControl::CanFocus() const void CGUILabelControl::SetLabel(const string &strLabel) { - // shorten the path label - if ( m_bHasPath ) - m_infoLabel.SetLabel(ShortenPath(strLabel), ""); - else // parse the label for info tags - m_infoLabel.SetLabel(strLabel, ""); + m_infoLabel.SetLabel(strLabel, ""); if (m_iCursorPos > (int)strLabel.size()) m_iCursorPos = strLabel.size(); } |