Fix AdjustForOverflow to use item->CalcMin, not item->GetSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -590,7 +590,7 @@ void wxGridBagSizer::AdjustForOverflow()
|
|||||||
// just look at the whole item height
|
// just look at the whole item height
|
||||||
if ( item->GetPos() == pos && endrow == row )
|
if ( item->GetPos() == pos && endrow == row )
|
||||||
{
|
{
|
||||||
int itemHeight = item->GetSize().GetHeight();
|
int itemHeight = item->CalcMin().GetHeight();
|
||||||
rowExtra = wxMin(rowExtra, rowHeight - itemHeight);
|
rowExtra = wxMin(rowExtra, rowHeight - itemHeight);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -599,7 +599,7 @@ void wxGridBagSizer::AdjustForOverflow()
|
|||||||
if ( endrow == row )
|
if ( endrow == row )
|
||||||
{
|
{
|
||||||
// first deduct the portions of the item that are on prior rows
|
// first deduct the portions of the item that are on prior rows
|
||||||
int itemHeight = item->GetSize().GetHeight();
|
int itemHeight = item->CalcMin().GetHeight();
|
||||||
for (int r=item->GetPos().GetRow(); r<row; r++)
|
for (int r=item->GetPos().GetRow(); r<row; r++)
|
||||||
itemHeight -= (m_rowHeights[r] + GetHGap());
|
itemHeight -= (m_rowHeights[r] + GetHGap());
|
||||||
|
|
||||||
@@ -631,14 +631,14 @@ void wxGridBagSizer::AdjustForOverflow()
|
|||||||
|
|
||||||
if ( item->GetPos() == pos && endcol == col )
|
if ( item->GetPos() == pos && endcol == col )
|
||||||
{
|
{
|
||||||
int itemWidth = item->GetSize().GetWidth();
|
int itemWidth = item->CalcMin().GetWidth();
|
||||||
colExtra = wxMin(colExtra, colWidth - itemWidth);
|
colExtra = wxMin(colExtra, colWidth - itemWidth);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( endcol == col )
|
if ( endcol == col )
|
||||||
{
|
{
|
||||||
int itemWidth = item->GetSize().GetWidth();
|
int itemWidth = item->CalcMin().GetWidth();
|
||||||
for (int c=item->GetPos().GetCol(); c<col; c++)
|
for (int c=item->GetPos().GetCol(); c<col; c++)
|
||||||
itemWidth -= (m_colWidths[c] + GetVGap());
|
itemWidth -= (m_colWidths[c] + GetVGap());
|
||||||
|
|
||||||
@@ -651,8 +651,6 @@ void wxGridBagSizer::AdjustForOverflow()
|
|||||||
if ( colExtra && colExtra != INT_MAX )
|
if ( colExtra && colExtra != INT_MAX )
|
||||||
m_colWidths[col] -= colExtra;
|
m_colWidths[col] -= colExtra;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user