- if (item->IsShown() && item->GetProportion() != 0)
- {
- int stretch = item->GetProportion();
- wxSize size( item->GetMinSizeWithBorder() );
- int minSize;
-
- // Integer division rounded up is (a + b - 1) / b
- // Round up needed in order to guarantee that all
- // all items will have size not less then their min size
- if (m_orient == wxHORIZONTAL)
- minSize = ( size.x*m_stretchable + stretch - 1)/stretch;
- else
- minSize = ( size.y*m_stretchable + stretch - 1)/stretch;
-
- if (minSize > maxMinSize)
- maxMinSize = minSize;
- }
- node = node->GetNext();
- }