CTextBox: fix pass of SCROLL_FRAME_WIDTH

Origin commit data
------------------
Branch: ni/coolstream
Commit: 4c388bb71c
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-03-06 (Mon, 06 Mar 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2017-03-06 20:48:39 +01:00
parent a3a0da0277
commit 4494a8ba5e

View File

@@ -299,9 +299,9 @@ void CTextBox::initFramesRel(void)
if(m_nMode & SCROLL)
{
m_cFrameScrollRel.iX = m_cFrame.iWidth - SCROLL_FRAME_WIDTH;
m_cFrameScrollRel.iY = m_cFrameTextRel.iY + m_nBgRadius;
m_cFrameScrollRel.iWidth = SCROLL_FRAME_WIDTH;
m_cFrameScrollRel.iX = m_cFrame.iWidth - m_cFrameScrollRel.iWidth;
m_cFrameScrollRel.iY = m_cFrameTextRel.iY + m_nBgRadius;
m_cFrameScrollRel.iHeight = m_cFrameTextRel.iHeight - 2*m_nBgRadius;
}
else
@@ -708,7 +708,7 @@ void CTextBox::refreshText(void)
if (m_nMode & CENTER)
x_center /= 2;
if (m_nMode & SCROLL)
x_center -= SCROLL_FRAME_WIDTH;
x_center -= m_cFrameScrollRel.iWidth;
}
x_center = std::max(x_center, 0);