Add support for background-color style to span element in wxHTML.
Add code for setting/restoring background mode and use it to implement support for changing the text background colour. Closes #14443. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -214,6 +214,11 @@ void wxHtmlWinParser::InitParser(const wxString& source)
|
||||
m_Link = wxHtmlLinkInfo( wxEmptyString );
|
||||
m_LinkColor.Set(0, 0, 0xFF);
|
||||
m_ActualColor.Set(0, 0, 0);
|
||||
const wxColour windowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) ;
|
||||
m_ActualBackgroundColor = m_windowInterface
|
||||
? m_windowInterface->GetHTMLBackgroundColour()
|
||||
: windowColour;
|
||||
m_ActualBackgroundMode = wxBRUSHSTYLE_TRANSPARENT;
|
||||
m_Align = wxHTML_ALIGN_LEFT;
|
||||
m_ScriptMode = wxHTML_SCRIPT_NORMAL;
|
||||
m_ScriptBaseline = 0;
|
||||
@@ -238,16 +243,13 @@ 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
|
||||
(
|
||||
m_windowInterface
|
||||
? m_windowInterface->GetHTMLBackgroundColour()
|
||||
: windowColour,
|
||||
wxHTML_CLR_BACKGROUND
|
||||
m_ActualBackgroundColor,
|
||||
m_ActualBackgroundMode == wxBRUSHSTYLE_TRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND
|
||||
)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user