Added: font style to <pre> element
--HG-- branch : develop
This commit is contained in:
parent
fe3601d664
commit
357973aa10
1 changed files with 30 additions and 1 deletions
|
@ -1914,7 +1914,29 @@ namespace NLGUI
|
|||
newParagraph(PBeginSpace);
|
||||
break;
|
||||
case HTML_PRE:
|
||||
{
|
||||
CStyleParams style;
|
||||
style.TextColor = getTextColor();
|
||||
style.FontFamily = "monospace";
|
||||
style.FontSize = getFontSize();
|
||||
style.FontWeight = getFontWeight();
|
||||
style.FontOblique = getFontOblique();
|
||||
style.Underlined = getFontUnderlined();
|
||||
style.StrikeThrough = getFontStrikeThrough();
|
||||
|
||||
if (present[MY_HTML_SPAN_STYLE] && value[MY_HTML_SPAN_STYLE])
|
||||
getStyleParams(value[MY_HTML_SPAN_STYLE], style);
|
||||
|
||||
_TextColor.push_back(style.TextColor);
|
||||
_FontFamily.push_back(style.FontFamily);
|
||||
_FontSize.push_back(style.FontSize);
|
||||
_FontWeight.push_back(style.FontWeight);
|
||||
_FontOblique.push_back(style.FontOblique);
|
||||
_FontUnderlined.push_back(style.Underlined);
|
||||
_FontStrikeThrough.push_back(style.StrikeThrough);
|
||||
|
||||
_PRE.push_back(true);
|
||||
}
|
||||
break;
|
||||
case HTML_TABLE:
|
||||
{
|
||||
|
@ -2333,6 +2355,13 @@ namespace NLGUI
|
|||
endParagraph();
|
||||
break;
|
||||
case HTML_PRE:
|
||||
popIfNotEmpty (_FontFamily);
|
||||
popIfNotEmpty (_FontSize);
|
||||
popIfNotEmpty (_FontWeight);
|
||||
popIfNotEmpty (_FontOblique);
|
||||
popIfNotEmpty (_TextColor);
|
||||
popIfNotEmpty (_FontUnderlined);
|
||||
popIfNotEmpty (_FontStrikeThrough);
|
||||
popIfNotEmpty (_PRE);
|
||||
break;
|
||||
case HTML_DIV:
|
||||
|
|
Loading…
Reference in a new issue