mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
CTextBox: Fix center / right text display
- The x position of the text could assume negative values,
when the text length was greater than the specified range.
Origin commit data
------------------
Branch: ni/coolstream
Commit: a6487fd951
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-10-16 (Thu, 16 Oct 2014)
Origin message was:
------------------
CTextBox: Fix center / right text display
- The x position of the text could assume negative values,
when the text length was greater than the specified range.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -636,6 +636,7 @@ void CTextBox::refreshText(void)
|
||||
if ( m_nMode & SCROLL )
|
||||
x_center -= SCROLL_FRAME_WIDTH;
|
||||
}
|
||||
x_center = std::max(x_center, 0);
|
||||
|
||||
//TRACE("[CTextBox] %s Line %d m_cFrame.iX %d m_cFrameTextRel.iX %d\r\n", __FUNCTION__, __LINE__, m_cFrame.iX, m_cFrameTextRel.iX);
|
||||
m_pcFontText->RenderString(m_cFrame.iX + m_cFrameTextRel.iX + text_Hborder_width + x_center,
|
||||
|
Reference in New Issue
Block a user