From f95d4458399aba2b422cb63f7b2678a6befac951 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 5 Jan 2016 23:02:21 +0200 Subject: [PATCH] Fixed: DL list DD element indent --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index d80a59266..1e802d9f2 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1999,19 +1999,11 @@ namespace NLGUI _DT = true; _FontWeight.push_back(FONT_WEIGHT_BOLD); } - - if (_DL.size() > 1) - { - uint indent = (_DL.size()-1) * ULIndent; - getParagraph()->setFirstViewIndent(indent); - } } break; case HTML_DD: if (getDL()) { - newParagraph(0); - // if there was no closing tag for
, then remove
style if (_DT) { @@ -2019,8 +2011,8 @@ namespace NLGUI popIfNotEmpty (_FontWeight); } - uint indent = _DL.size()*ULIndent; - getParagraph()->setFirstViewIndent(indent); + _Indent += ULIndent; + newParagraph(0); } break; case HTML_OL: @@ -2225,6 +2217,13 @@ namespace NLGUI if (getDL()) { endParagraph(); + if (getDL()) + { + if (_Indent > ULIndent) + _Indent = _Indent - ULIndent; + else + _Indent = 0; + } popIfNotEmpty (_DL); if (_DT) { _DT = false; @@ -2244,6 +2243,13 @@ namespace NLGUI break; case HTML_DD: // style not changed + if (getDL()) + { + if (_Indent > ULIndent) + _Indent = _Indent - ULIndent; + else + _Indent = 0; + } break; case HTML_SPAN: popIfNotEmpty (_FontSize);