mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
* CTextBox: Fix displayed text width in function setText()
This commit is contained in:
@@ -332,8 +332,8 @@ void CTextBox::refreshTextLineArray(void)
|
|||||||
lineBreakWidth = std::max(m_nMaxWidth, m_cFrameTextRel.iWidth - 2*text_border_width);
|
lineBreakWidth = std::max(m_nMaxWidth, m_cFrameTextRel.iWidth - 2*text_border_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(m_nMaxWidth)
|
if(m_nMaxTextWidth)
|
||||||
// lineBreakWidth = m_nMaxWidth;
|
lineBreakWidth = m_nMaxTextWidth;
|
||||||
|
|
||||||
//TRACE("[CTextBox] line %d: lineBreakWidth %d\n", __LINE__, lineBreakWidth);
|
//TRACE("[CTextBox] line %d: lineBreakWidth %d\n", __LINE__, lineBreakWidth);
|
||||||
|
|
||||||
@@ -595,8 +595,7 @@ bool CTextBox::setText(const std::string* newText, int max_width)
|
|||||||
{
|
{
|
||||||
//TRACE("[CTextBox]->SetText \r\n");
|
//TRACE("[CTextBox]->SetText \r\n");
|
||||||
bool result = false;
|
bool result = false;
|
||||||
if (max_width>0)
|
m_nMaxTextWidth = max_width;
|
||||||
m_nMaxTextWidth = max_width;
|
|
||||||
|
|
||||||
//printf("setText: _max_width %d max_width %d\n", _max_width, max_width);
|
//printf("setText: _max_width %d max_width %d\n", _max_width, max_width);
|
||||||
if (newText != NULL)
|
if (newText != NULL)
|
||||||
|
Reference in New Issue
Block a user