X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b6d93b260ee0e8a145b8965da7e8eef1fed17670..e07d33e7244bbc6192b00cd7839ea96a50014228:/src/html/winpars.cpp diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index ce73fbcfd4..0709e77518 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -8,7 +8,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "winpars.h" #endif @@ -31,6 +31,7 @@ #include "wx/html/htmlwin.h" #include "wx/fontmap.h" #include "wx/log.h" +#include "wx/settings.h" //----------------------------------------------------------------------------- @@ -187,6 +188,12 @@ void wxHtmlWinParser::InitParser(const wxString& source) #endif m_Container->InsertCell(new wxHtmlColourCell(m_ActualColor)); + wxColour windowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) ; + m_Container->InsertCell( + new wxHtmlColourCell(GetWindow() ? + GetWindow()->GetBackgroundColour() : + windowColour, + wxHTML_CLR_BACKGROUND)); m_Container->InsertCell(new wxHtmlFontCell(CreateCurrentFont())); } @@ -208,6 +215,8 @@ wxObject* wxHtmlWinParser::GetProduct() top = m_Container; while (top->GetParent()) top = top->GetParent(); + top->RemoveExtraSpacing(true, true); + return top; }