Fixed: DL list DD element indent

--HG--
branch : develop
This commit is contained in:
Nimetu 2016-01-05 23:02:21 +02:00
parent bbe9ca2b67
commit f95d445839

View file

@ -1999,19 +1999,11 @@ namespace NLGUI
_DT = true; _DT = true;
_FontWeight.push_back(FONT_WEIGHT_BOLD); _FontWeight.push_back(FONT_WEIGHT_BOLD);
} }
if (_DL.size() > 1)
{
uint indent = (_DL.size()-1) * ULIndent;
getParagraph()->setFirstViewIndent(indent);
}
} }
break; break;
case HTML_DD: case HTML_DD:
if (getDL()) if (getDL())
{ {
newParagraph(0);
// if there was no closing tag for <dt>, then remove <dt> style // if there was no closing tag for <dt>, then remove <dt> style
if (_DT) if (_DT)
{ {
@ -2019,8 +2011,8 @@ namespace NLGUI
popIfNotEmpty (_FontWeight); popIfNotEmpty (_FontWeight);
} }
uint indent = _DL.size()*ULIndent; _Indent += ULIndent;
getParagraph()->setFirstViewIndent(indent); newParagraph(0);
} }
break; break;
case HTML_OL: case HTML_OL:
@ -2225,6 +2217,13 @@ namespace NLGUI
if (getDL()) if (getDL())
{ {
endParagraph(); endParagraph();
if (getDL())
{
if (_Indent > ULIndent)
_Indent = _Indent - ULIndent;
else
_Indent = 0;
}
popIfNotEmpty (_DL); popIfNotEmpty (_DL);
if (_DT) { if (_DT) {
_DT = false; _DT = false;
@ -2244,6 +2243,13 @@ namespace NLGUI
break; break;
case HTML_DD: case HTML_DD:
// style not changed // style not changed
if (getDL())
{
if (_Indent > ULIndent)
_Indent = _Indent - ULIndent;
else
_Indent = 0;
}
break; break;
case HTML_SPAN: case HTML_SPAN:
popIfNotEmpty (_FontSize); popIfNotEmpty (_FontSize);