Add support for CSS "color", "size" and "font" to wxHTML <font>

Simply map them to the existing HTML parameters, just as we already do for a
few other styles.

Closes #16773.
This commit is contained in:
Kinaou Hervé
2015-12-02 23:53:00 +01:00
committed by Vadim Zeitlin
parent 0ed580f451
commit d3931ea660
3 changed files with 59 additions and 7 deletions

View File

@@ -464,6 +464,9 @@ wxHtmlTag::wxHtmlTag(wxHtmlTag *parent,
{ "vertical-align", "VALIGN" },
{ "background", "BGCOLOR" },
{ "background-color", "BGCOLOR" },
{ "color", "COLOR" },
{ "size", "SIZE" },
{ "face", "FACE" },
};
wxHtmlStyleParams styleParams(*this);
@@ -613,6 +616,10 @@ wxHtmlTag::GetParamAsIntOrPercent(const wxString& par,
{
isPercent = true;
}
else if ( param.EndsWith("px", &num) )
{
isPercent = false;
}
else
{
isPercent = false;