From af43e4267ff72a546e9d099889ed95e6725b0639 Mon Sep 17 00:00:00 2001 From: seife Date: Sat, 1 Jan 2011 16:48:55 +0000 Subject: [PATCH] neutrino: make CListFrame not shorten lines (affects moviebrowser) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@990 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/listframe.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index ce41cd96c..2da96f5eb 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -461,12 +461,8 @@ void CListFrame::refreshLine(int line) y += m_nFontListHeight; for(int row = 0; row < m_pLines->rows; row++) { - width = m_pLines->rowWidth[row] ; - if(width > m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - 2*TEXT_BORDER_WIDTH) - { - width = m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - 2*TEXT_BORDER_WIDTH; - //TRACE(" normalize to %d,x:%d\r\n",width,x); - } + width = std::min(m_pLines->rowWidth[row], + m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH); m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, width, m_pLines->lineArray[row][line].c_str(), color, 0, true); // UTF-8 @@ -490,9 +486,9 @@ void CListFrame::refreshHeaderList(void) for(int row = 0; row < m_pLines->rows && loop == true; row++) { width = m_pLines->rowWidth[row] ; - if(width > m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - 2*TEXT_BORDER_WIDTH) + if(width > m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - TEXT_BORDER_WIDTH) { - width = m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - 2*TEXT_BORDER_WIDTH; + width = m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - TEXT_BORDER_WIDTH; //TRACE(" normalize width to %d , x:%d \r\n",width,x); loop = false; }