mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
textbox: fix lineBreakWidth calculation
Origin commit data
------------------
Commit: 99a9f8a7e5
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-27 (Thu, 27 Oct 2016)
Origin message was:
------------------
- 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