Changed: Use table width used min-width and allow table cells to properly fit
--HG-- branch : develop
This commit is contained in:
parent
f275bcc279
commit
cbe4bf33d6
1 changed files with 13 additions and 0 deletions
|
@ -843,6 +843,19 @@ namespace NLGUI
|
||||||
ratio -= _Columns[i].TableRatio;
|
ratio -= _Columns[i].TableRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// force table width to fit all columns
|
||||||
|
// if width is set, then use column min width
|
||||||
|
if (ForceWidthMin > 0)
|
||||||
|
tableWidthMax = std::min(_LastParentW - borderWidth, std::max(tableWidthMax, tableWidth));
|
||||||
|
else
|
||||||
|
tableWidthMax = std::min(_LastParentW - borderWidth, std::max(tableWidthMax, tableMaxContentWidth));
|
||||||
|
|
||||||
|
if (tableWidthMax < 0)
|
||||||
|
tableWidthMax = 0;
|
||||||
|
|
||||||
|
if (tableWidthMax < tableWidthMin)
|
||||||
|
std::swap(tableWidthMin, tableWidthMax);
|
||||||
|
|
||||||
// Eval table size with all percent cells resized
|
// Eval table size with all percent cells resized
|
||||||
sint32 tableWidthSizeAfterPercent = tableWidth;
|
sint32 tableWidthSizeAfterPercent = tableWidth;
|
||||||
for (i=0; i<_Columns.size(); i++)
|
for (i=0; i<_Columns.size(); i++)
|
||||||
|
|
Loading…
Reference in a new issue