The gaps should *not* be included in the space given to the item, and
so should also not be accounted for in the alignment adjustmanets git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -547,11 +547,13 @@ void wxGridBagSizer::RecalcSizes()
|
||||
|
||||
height = 0;
|
||||
for(idx=row; idx <= endrow; idx++)
|
||||
height += m_rowHeights[idx] + m_vgap;
|
||||
height += m_rowHeights[idx];
|
||||
height += (endrow - row) * m_vgap; // add a vgap for every row spanned
|
||||
|
||||
width = 0;
|
||||
for (idx=col; idx <= endcol; idx++)
|
||||
width += m_colWidths[idx] + m_hgap;
|
||||
width += m_colWidths[idx];
|
||||
width += (endcol - col) * m_hgap; // add a hgap for every col spanned
|
||||
|
||||
SetItemBounds(item, colpos[col], rowpos[row], width, height);
|
||||
|
||||
|
Reference in New Issue
Block a user