Ensure a small spanned column doesn't shrink its columns too much by checking for min column sizes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -10219,8 +10219,12 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const
|
|||||||
int stretchColCount = 0;
|
int stretchColCount = 0;
|
||||||
for (k = i; k < (i+spans); k++)
|
for (k = i; k < (i+spans); k++)
|
||||||
{
|
{
|
||||||
|
int minColWidth = wxMax(minColWidths[k], minColWidthsNoWrap[k]);
|
||||||
|
|
||||||
if (colWidths[k] > 0) // absolute or proportional width has been specified
|
if (colWidths[k] > 0) // absolute or proportional width has been specified
|
||||||
spanningWidthLeft -= colWidths[k];
|
spanningWidthLeft -= colWidths[k];
|
||||||
|
else if (minColWidth > 0)
|
||||||
|
spanningWidthLeft -= minColWidth;
|
||||||
else
|
else
|
||||||
stretchColCount ++;
|
stretchColCount ++;
|
||||||
}
|
}
|
||||||
@@ -10237,7 +10241,8 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const
|
|||||||
{
|
{
|
||||||
for (k = i; k < (i+spans); k++)
|
for (k = i; k < (i+spans); k++)
|
||||||
{
|
{
|
||||||
if (colWidths[k] <= 0) // absolute or proportional width has not been specified
|
int minColWidth = wxMax(minColWidths[k], minColWidthsNoWrap[k]);
|
||||||
|
if (colWidths[k] <= 0 && minColWidth <= 0) // absolute or proportional width has not been specified
|
||||||
{
|
{
|
||||||
int newWidth = colShare;
|
int newWidth = colShare;
|
||||||
if (k == (i+spans-1))
|
if (k == (i+spans-1))
|
||||||
|
|||||||
Reference in New Issue
Block a user