]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed incorrect rendering of tables with cellspacing and cellpadding and colspan...
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 5 Dec 1999 19:31:39 +0000 (19:31 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 5 Dec 1999 19:31:39 +0000 (19:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/m_tables.cpp

index 33e24919fb2c4a7fa39838478edb4148e35366fb..4850c1b0075c29e7a911690bb2656ceddb81d8f2 100644 (file)
@@ -360,6 +360,7 @@ void wxHtmlTableCell::Layout(int w)
                 fullwid = 0;
                 for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
                     fullwid += m_ColsInfo[i].pixwidth;
+                fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
                 actcell -> SetMinHeight(m_CellInfo[actrow][actcol].minheight, m_CellInfo[actrow][actcol].valign);
                 actcell -> Layout(fullwid);
 
@@ -378,11 +379,12 @@ void wxHtmlTableCell::Layout(int w)
                 if (m_CellInfo[actrow][actcol].flag != cellUsed) continue;
                 actcell = m_CellInfo[actrow][actcol].cont;
                 actcell -> SetMinHeight(
-                                 ypos[actrow + m_CellInfo[actrow][actcol].rowspan] - ypos[actrow] - m_CellInfo[actrow][actcol].rowspan * m_Spacing,
+                                 ypos[actrow + m_CellInfo[actrow][actcol].rowspan] - ypos[actrow] -  m_Spacing,
                                  m_CellInfo[actrow][actcol].valign);
                 fullwid = 0;
                 for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
                     fullwid += m_ColsInfo[i].pixwidth;
+                fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
                 actcell -> Layout(fullwid);
                 actcell -> SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]);
             }