Merge branch 'wxhtml-total-width'
Fix computation of max total width for container cells in wxHTML. See https://github.com/wxWidgets/wxWidgets/pull/1504
This commit is contained in:
@@ -292,8 +292,9 @@ wxString wxHtmlCell::GetDescription() const
|
|||||||
wxString wxHtmlCell::Dump(int indent) const
|
wxString wxHtmlCell::Dump(int indent) const
|
||||||
{
|
{
|
||||||
wxString s(' ', indent);
|
wxString s(' ', indent);
|
||||||
s += wxString::Format("%s at (%d, %d) %dx%d",
|
s += wxString::Format("%s(%p) at (%d, %d) %dx%d",
|
||||||
GetDescription(), m_PosX, m_PosY, m_Width, m_Height);
|
GetDescription(), this,
|
||||||
|
m_PosX, m_PosY, GetMaxTotalWidth(), m_Height);
|
||||||
if ( !m_id.empty() )
|
if ( !m_id.empty() )
|
||||||
s += wxString::Format(" [id=%s]", m_id);
|
s += wxString::Format(" [id=%s]", m_id);
|
||||||
|
|
||||||
@@ -823,8 +824,9 @@ void wxHtmlContainerCell::Layout(int w)
|
|||||||
if (curLineWidth > m_MaxTotalWidth)
|
if (curLineWidth > m_MaxTotalWidth)
|
||||||
m_MaxTotalWidth = curLineWidth;
|
m_MaxTotalWidth = curLineWidth;
|
||||||
|
|
||||||
if (wxMax(cell->GetWidth(), cell->GetMaxTotalWidth()) > m_MaxTotalWidth)
|
if (cell->GetMaxTotalWidth() > m_MaxTotalWidth)
|
||||||
m_MaxTotalWidth = cell->GetMaxTotalWidth();
|
m_MaxTotalWidth = cell->GetMaxTotalWidth();
|
||||||
|
|
||||||
curLineWidth = 0;
|
curLineWidth = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user