From bff8ed488e5f6a844220cf721c8d167c73bf6d98 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 25 Apr 2017 12:18:53 +0300 Subject: [PATCH 1/2] Changed: CGroupParagraph does not handle text with line-breaks --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 0c1fba8d0..1f3d6d6c7 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1517,7 +1517,14 @@ namespace NLGUI } break; case HTML_BR: - addString(ucstring ("\n")); + { + endParagraph(); + + // insert zero-width-space (0x200B) to prevent removal of empty lines + ucstring tmp; + tmp.fromUtf8("\xe2\x80\x8b"); + addString(tmp); + } break; case HTML_BODY: { From a47a481c7a78f507f5a42960f97cce93c772d528 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 26 Apr 2017 08:53:02 +0300 Subject: [PATCH 2/2] Changed: Force max table width if requested. --HG-- branch : develop --- code/nel/src/gui/group_table.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/nel/src/gui/group_table.cpp b/code/nel/src/gui/group_table.cpp index f3f009dfc..ef3eca57a 100644 --- a/code/nel/src/gui/group_table.cpp +++ b/code/nel/src/gui/group_table.cpp @@ -1209,6 +1209,13 @@ namespace NLGUI // ---------------------------------------------------------------------------- sint32 CGroupTable::getMaxUsedW() const { + // Return table width if its requested by user. + // Need to do this because width of long line of text in here is calculated + // differently than final cell width in updateCoords() + // This will break tables with too narrow width set by user. + if (ForceWidthMin > 0) + return ForceWidthMin; + uint i; uint column = 0; vector columns;