X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..d949570b6673dadd764686213afb89bddb6f19da:/src/html/m_tables.cpp diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp index 7f965d7e0c..f50de26c79 100644 --- a/src/html/m_tables.cpp +++ b/src/html/m_tables.cpp @@ -15,7 +15,8 @@ #if wxUSE_HTML && wxUSE_STREAMS -#ifndef WXPRECOMP +#ifndef WX_PRECOMP + #include "wx/wxcrtvararg.h" #endif #include "wx/html/forcelnk.h" @@ -136,7 +137,11 @@ wxHtmlTableCell::wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& t /* scan params: */ if (tag.HasParam(wxT("BGCOLOR"))) + { tag.GetParamAsColour(wxT("BGCOLOR"), &m_tBkg); + if (m_tBkg.Ok()) + SetBackgroundColour(m_tBkg); + } if (tag.HasParam(wxT("VALIGN"))) m_tValign = tag.GetParam(wxT("VALIGN")); else @@ -571,6 +576,10 @@ void wxHtmlTableCell::Layout(int w) m_ColsInfo[i].leftpos = wpos; wpos += m_ColsInfo[i].pixwidth + m_Spacing; } + + // add the remaining space to the last column + if (m_NumCols > 0 && wpos < m_Width) + m_ColsInfo[m_NumCols-1].pixwidth += m_Width - wpos; } /* 3. sub-layout all cells: */ @@ -672,7 +681,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") oldcont = c = m_WParser->OpenContainer(); - m_Table = new wxHtmlTableCell(c, tag); + m_Table = new wxHtmlTableCell(c, tag, m_WParser->GetPixelScale()); // width: {