Explicitly skip expanding stretchable separators in MSW toolbars
When computing the fixed size of MSW toolbars, don't take stretchable separators into account as this doesn't make sense and so, even if this doesn't matter currently because the separators still have their initial, fixed size when total fixed size is computed, but would start mattering if UpdateStretchableSpacersSize() is ever called before this is done and it also just makes more sense to skip them here.
This commit is contained in:
@@ -1200,10 +1200,15 @@ bool wxToolBar::Realize()
|
||||
|
||||
if ( !tool->IsControl() )
|
||||
{
|
||||
if ( IsVertical() )
|
||||
m_totalFixedSize += r.bottom - r.top;
|
||||
else
|
||||
m_totalFixedSize += r.right - r.left;
|
||||
// Stretchable space don't have any fixed size and their current
|
||||
// size shouldn't count at all.
|
||||
if ( !tool->IsStretchableSpace() )
|
||||
{
|
||||
if ( IsVertical() )
|
||||
m_totalFixedSize += r.bottom - r.top;
|
||||
else
|
||||
m_totalFixedSize += r.right - r.left;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user