Changed: Remove window content tiny size limit
--HG-- branch : develop
This commit is contained in:
parent
7ed7491f04
commit
e573c7b6e9
4 changed files with 27 additions and 14 deletions
|
@ -353,6 +353,9 @@ namespace NLGUI
|
||||||
void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH);
|
void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH);
|
||||||
void restoreClip (sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH);
|
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.
|
// 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,
|
void computeCurrentClipContribution(sint32 prevX, sint32 prevY, sint32 prevW, sint32 prevH,
|
||||||
sint32 &newX, sint32 &newY, sint32 &newW, sint32 &newH) const;
|
sint32 &newX, sint32 &newY, sint32 &newW, sint32 &newH) const;
|
||||||
|
|
|
@ -2385,7 +2385,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
_W = _Parent->getW();
|
_W = _Parent->getW();
|
||||||
}
|
}
|
||||||
setMaxH (16384); // No scrollbar for container of layer > 0
|
setMaxH (std::numeric_limits<sint32>::max()); // No scrollbar for container of layer > 0
|
||||||
newH = (pLayer->H_T - pLayer->InsetT);
|
newH = (pLayer->H_T - pLayer->InsetT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2468,7 +2468,7 @@ namespace NLGUI
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_List != NULL)
|
if (_List != NULL)
|
||||||
_List->setMaxH (16384);
|
_List->setMaxH (std::numeric_limits<sint32>::max());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_LayerSetup == 0)
|
if (_LayerSetup == 0)
|
||||||
|
|
|
@ -51,14 +51,14 @@ namespace NLGUI
|
||||||
CInterfaceGroup::CInterfaceGroup(const TCtorParam ¶m) : CCtrlBase(param)
|
CInterfaceGroup::CInterfaceGroup(const TCtorParam ¶m) : CCtrlBase(param)
|
||||||
{
|
{
|
||||||
_ParentSizeMax = NULL;
|
_ParentSizeMax = NULL;
|
||||||
_MaxW = _MaxH = 16384;
|
_MaxW = _MaxH = std::numeric_limits<sint32>::max();
|
||||||
_OffsetX = _OffsetY = 0;
|
_OffsetX = _OffsetY = 0;
|
||||||
_Overlappable= true;
|
_Overlappable= true;
|
||||||
_ResizeFromChildW= false;
|
_ResizeFromChildW= false;
|
||||||
_ResizeFromChildH= false;
|
_ResizeFromChildH= false;
|
||||||
_ResizeFromChildWMargin= 0;
|
_ResizeFromChildWMargin= 0;
|
||||||
_ResizeFromChildHMargin= 0;
|
_ResizeFromChildHMargin= 0;
|
||||||
_MaxWReal = _MaxHReal = 16384;
|
_MaxWReal = _MaxHReal = std::numeric_limits<sint32>::max();
|
||||||
_GroupSizeRef = 0;
|
_GroupSizeRef = 0;
|
||||||
_Escapable= false;
|
_Escapable= false;
|
||||||
_Priority= WIN_PRIORITY_NORMAL;
|
_Priority= WIN_PRIORITY_NORMAL;
|
||||||
|
@ -1542,12 +1542,8 @@ namespace NLGUI
|
||||||
// \todo yoyo: do not know why but don't work if this==scroll_text
|
// \todo yoyo: do not know why but don't work if this==scroll_text
|
||||||
if(sonGroup && !isGroupScrollText())
|
if(sonGroup && !isGroupScrollText())
|
||||||
{
|
{
|
||||||
sint32 oldSciX= -16384;
|
|
||||||
sint32 oldSciY= -16384;
|
|
||||||
sint32 oldSciW= 32768;
|
|
||||||
sint32 oldSciH= 32768;
|
|
||||||
sint32 w, h;
|
sint32 w, h;
|
||||||
sonGroup->computeCurrentClipContribution(oldSciX, oldSciY, oldSciW, oldSciH, x0, y0, w, h);
|
sonGroup->computeClipContribution(x0, y0, w, h);
|
||||||
x1= x0 + w;
|
x1= x0 + w;
|
||||||
y1= y0 + h;
|
y1= y0 + h;
|
||||||
}
|
}
|
||||||
|
@ -1926,8 +1922,7 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CInterfaceGroup::computeCurrentClipContribution(sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH,
|
void CInterfaceGroup::computeClipContribution(sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const
|
||||||
sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const
|
|
||||||
{
|
{
|
||||||
sint32 newSciX = _XReal;
|
sint32 newSciX = _XReal;
|
||||||
sint32 newSciY = _YReal;
|
sint32 newSciY = _YReal;
|
||||||
|
@ -1947,6 +1942,21 @@ namespace NLGUI
|
||||||
newSciY = _YReal + _HReal - _MaxHReal;
|
newSciY = _YReal + _HReal - _MaxHReal;
|
||||||
newSciH = _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
|
// Clip Left
|
||||||
if (newSciX < oldSciX)
|
if (newSciX < oldSciX)
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace NLGUI
|
||||||
_MultiLine = false;
|
_MultiLine = false;
|
||||||
_TextMode = DontClipWord;
|
_TextMode = DontClipWord;
|
||||||
_MultiLineSpace = 8;
|
_MultiLineSpace = 8;
|
||||||
_LineMaxW = 16384;
|
_LineMaxW = std::numeric_limits<sint32>::max();
|
||||||
_MultiLineMaxWOnly = false;
|
_MultiLineMaxWOnly = false;
|
||||||
_MultiLineClipEndSpace = false;
|
_MultiLineClipEndSpace = false;
|
||||||
_LastMultiLineMaxW = 0;
|
_LastMultiLineMaxW = 0;
|
||||||
|
@ -199,7 +199,7 @@ namespace NLGUI
|
||||||
|
|
||||||
_MultiLine = false;
|
_MultiLine = false;
|
||||||
_MultiLineSpace = 8;
|
_MultiLineSpace = 8;
|
||||||
_LineMaxW= 16384;
|
_LineMaxW= std::numeric_limits<sint32>::max();
|
||||||
_MultiLineMaxWOnly = false;
|
_MultiLineMaxWOnly = false;
|
||||||
_MultiLineClipEndSpace = false;
|
_MultiLineClipEndSpace = false;
|
||||||
_LastMultiLineMaxW = 0;
|
_LastMultiLineMaxW = 0;
|
||||||
|
@ -858,7 +858,7 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"line_maxw" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"line_maxw" );
|
||||||
_LineMaxW = 16384;
|
_LineMaxW = std::numeric_limits<sint32>::max();
|
||||||
if (prop)
|
if (prop)
|
||||||
fromString((const char*)prop, _LineMaxW);
|
fromString((const char*)prop, _LineMaxW);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue