diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index fea928cb3..cef9abb45 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -353,6 +353,9 @@ namespace NLGUI void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH); void restoreClip (sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH); + // Compute clip contribution for current window. This doesn't change the clip window in the driver. + void computeClipContribution(sint32 &newX, sint32 &newY, sint32 &newW, sint32 &newH) const; + // Compute clip contribution for current window, and a previous clipping rectangle. This doesn't change the clip window in the driver. void computeCurrentClipContribution(sint32 prevX, sint32 prevY, sint32 prevW, sint32 prevH, sint32 &newX, sint32 &newY, sint32 &newW, sint32 &newH) const; diff --git a/code/nel/src/gui/group_container.cpp b/code/nel/src/gui/group_container.cpp index 26a23fd9f..a21734fdb 100644 --- a/code/nel/src/gui/group_container.cpp +++ b/code/nel/src/gui/group_container.cpp @@ -2385,7 +2385,7 @@ namespace NLGUI { _W = _Parent->getW(); } - setMaxH (16384); // No scrollbar for container of layer > 0 + setMaxH (std::numeric_limits::max()); // No scrollbar for container of layer > 0 newH = (pLayer->H_T - pLayer->InsetT); } @@ -2468,7 +2468,7 @@ namespace NLGUI else { if (_List != NULL) - _List->setMaxH (16384); + _List->setMaxH (std::numeric_limits::max()); } if (_LayerSetup == 0) diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 3996d827f..07b840695 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -51,14 +51,14 @@ namespace NLGUI CInterfaceGroup::CInterfaceGroup(const TCtorParam ¶m) : CCtrlBase(param) { _ParentSizeMax = NULL; - _MaxW = _MaxH = 16384; + _MaxW = _MaxH = std::numeric_limits::max(); _OffsetX = _OffsetY = 0; _Overlappable= true; _ResizeFromChildW= false; _ResizeFromChildH= false; _ResizeFromChildWMargin= 0; _ResizeFromChildHMargin= 0; - _MaxWReal = _MaxHReal = 16384; + _MaxWReal = _MaxHReal = std::numeric_limits::max(); _GroupSizeRef = 0; _Escapable= false; _Priority= WIN_PRIORITY_NORMAL; @@ -1542,12 +1542,8 @@ namespace NLGUI // \todo yoyo: do not know why but don't work if this==scroll_text if(sonGroup && !isGroupScrollText()) { - sint32 oldSciX= -16384; - sint32 oldSciY= -16384; - sint32 oldSciW= 32768; - sint32 oldSciH= 32768; sint32 w, h; - sonGroup->computeCurrentClipContribution(oldSciX, oldSciY, oldSciW, oldSciH, x0, y0, w, h); + sonGroup->computeClipContribution(x0, y0, w, h); x1= x0 + w; y1= y0 + h; } @@ -1926,8 +1922,7 @@ namespace NLGUI } // ------------------------------------------------------------------------------------------------ - void CInterfaceGroup::computeCurrentClipContribution(sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH, - sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const + void CInterfaceGroup::computeClipContribution(sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const { sint32 newSciX = _XReal; sint32 newSciY = _YReal; @@ -1947,6 +1942,21 @@ namespace NLGUI newSciY = _YReal + _HReal - _MaxHReal; newSciH = _MaxHReal; } + // Don't apply margins because HTML list marker is drawn outside group paragraph inner content. + // Should not be an issue because horizontal scolling not used. + newSciXDest = newSciX/* + _MarginLeft*/; + newSciYDest = newSciY; + newSciWDest = newSciW/* - _MarginLeft*/; + newSciHDest = newSciH; + } + + // ------------------------------------------------------------------------------------------------ + void CInterfaceGroup::computeCurrentClipContribution(sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH, + sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const + { + sint32 newSciX, newSciY, newSciW, newSciH; + computeClipContribution(newSciX, newSciY, newSciW, newSciH); + // Clip Left if (newSciX < oldSciX) { diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index cf3857102..fc388ec72 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -79,7 +79,7 @@ namespace NLGUI _MultiLine = false; _TextMode = DontClipWord; _MultiLineSpace = 8; - _LineMaxW = 16384; + _LineMaxW = std::numeric_limits::max(); _MultiLineMaxWOnly = false; _MultiLineClipEndSpace = false; _LastMultiLineMaxW = 0; @@ -199,7 +199,7 @@ namespace NLGUI _MultiLine = false; _MultiLineSpace = 8; - _LineMaxW= 16384; + _LineMaxW= std::numeric_limits::max(); _MultiLineMaxWOnly = false; _MultiLineClipEndSpace = false; _LastMultiLineMaxW = 0; @@ -858,7 +858,7 @@ namespace NLGUI } prop = (char*) xmlGetProp( cur, (xmlChar*)"line_maxw" ); - _LineMaxW = 16384; + _LineMaxW = std::numeric_limits::max(); if (prop) fromString((const char*)prop, _LineMaxW);