Make WX_HTML_REPORT_PANEL use the default system background color.

This commit is contained in:
Maciej Suminski 2015-06-26 17:34:07 +02:00
parent 15857f22ca
commit 1c5cde94f0
2 changed files with 14 additions and 1 deletions

View File

@ -35,6 +35,7 @@ WX_HTML_REPORT_PANEL::WX_HTML_REPORT_PANEL( wxWindow* parent,
m_showAll( true )
{
syncCheckboxes();
m_htmlView->SetPage( addHeader( "" ) );
}
@ -79,11 +80,22 @@ void WX_HTML_REPORT_PANEL::refreshView()
html += generateHtml( l );
}
m_htmlView->SetPage( html );
m_htmlView->SetPage( addHeader( html ) );
scrollToBottom();
}
wxString WX_HTML_REPORT_PANEL::addHeader( const wxString& aBody )
{
wxColour bgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
wxString s = "<html><body bgcolor=\"" + bgcolor.GetAsString( wxC2S_HTML_SYNTAX ) + "\">";
s += aBody;
s += "</body></html>";
return s;
}
wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
{
if( !m_showAll && ! ( m_severities & aLine.severity ) )

View File

@ -64,6 +64,7 @@ private:
typedef std::vector<REPORT_LINE> REPORT_LINES;
wxString addHeader( const wxString& aBody );
wxString generateHtml( const REPORT_LINE& aLine );
wxString generatePlainText( const REPORT_LINE& aLine );