From 30caac063eae3f9b3cdfad6f480005f65ef0b872 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 23 May 2018 22:18:19 +0300 Subject: [PATCH] Fixed: Wrong text width when used inside html list element --HG-- branch : develop --- code/nel/src/gui/view_text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index 2faae3a0a..c14a7f9a1 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -886,8 +886,8 @@ namespace NLGUI return _LineMaxW; else { - sint parentWidth = std::min(_Parent->getMaxWReal(), _Parent->getWReal()); - return std::min(parentWidth-(sint)(_XReal-_Parent->getXReal()), (sint)_LineMaxW); + sint parentWidth = std::min(_Parent->getMaxWReal(), _Parent->getWReal() - _Parent->getMarginLeft()); + return std::min(parentWidth-(sint)(_XReal-(_Parent->getXReal()-_Parent->getMarginLeft())), (sint)_LineMaxW); } }