mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- textbox: fix lineBreakWidth calculation
This commit is contained in:
@@ -353,12 +353,13 @@ void CTextBox::refreshTextLineArray(void)
|
|||||||
m_cLineArray.clear();
|
m_cLineArray.clear();
|
||||||
m_nNrOfLines = 0;
|
m_nNrOfLines = 0;
|
||||||
|
|
||||||
|
int MaxWidth = m_nMaxWidth - m_cFrameScrollRel.iWidth - 2*text_Hborder_width;
|
||||||
if( m_nMode & AUTO_WIDTH){
|
if( m_nMode & AUTO_WIDTH){
|
||||||
/* In case of autowidth, we calculate the max allowed width of the textbox */
|
/* In case of autowidth, we calculate the max allowed width of the textbox */
|
||||||
lineBreakWidth = m_nMaxWidth - m_cFrameScrollRel.iWidth - 2*text_Hborder_width;
|
lineBreakWidth = MaxWidth;
|
||||||
}else{
|
}else{
|
||||||
/* If not autowidth, we just take the actuall textframe width */
|
/* If not autowidth, we just take the actuall textframe width */
|
||||||
lineBreakWidth = std::max(m_nMaxWidth, m_cFrameTextRel.iWidth - 2*text_Hborder_width);
|
lineBreakWidth = std::max(MaxWidth, m_cFrameTextRel.iWidth - 2*text_Hborder_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_nMaxTextWidth)
|
if(m_nMaxTextWidth)
|
||||||
|
Reference in New Issue
Block a user