X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79d6c01818cafa1d95973955c8c55519d9550cf1..758bce950ba9236d0a9edc4c880c3ec73b5173f3:/src/html/m_tables.cpp diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp index 4f9af45eeb..a9c560ea44 100644 --- a/src/html/m_tables.cpp +++ b/src/html/m_tables.cpp @@ -343,8 +343,6 @@ void wxHtmlTableCell::ComputeMinMaxWidths() int left, right, width; - m_ColsInfo[0].minWidth = 0; // avoid recursion - Layout(1); for (int c = 0; c < m_NumCols; c++) { for (int r = 0; r < m_NumRows; r++) @@ -352,12 +350,13 @@ void wxHtmlTableCell::ComputeMinMaxWidths() cellStruct& cell = m_CellInfo[r][c]; if (cell.flag == cellUsed) { + cell.cont->Layout(2*m_Padding + 1); cell.cont->GetHorizontalConstraints(&left, &right); - width = right - left + 1; + width = right - left; + width -= (cell.colspan-1) * m_Spacing; // HTML 4.0 says it is acceptable to distribute min/max // width of spanning cells evently width /= cell.colspan; - width += m_Spacing + 2*m_Padding; for (int j = 0; j < cell.colspan; j++) if (width > m_ColsInfo[c+j].minWidth) m_ColsInfo[c+j].minWidth = width; @@ -373,6 +372,8 @@ void wxHtmlTableCell::ComputeMinMaxWidths() void wxHtmlTableCell::Layout(int w) { ComputeMinMaxWidths(); + + wxHtmlCell::Layout(w); /*