X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3d0bc4364695d9351f9054de396e031b29f629c..9914bfbb77f48baf869b63aff58feb2b145ff4d3:/src/msw/toolbar.cpp diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index 31233565bd..ce1595afa9 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -1219,13 +1219,13 @@ void wxToolBar::UpdateStretchableSpacersSize() // reduce their size if there is not enough place for all tools const int totalSize = IsVertical() ? GetClientSize().y : GetClientSize().x; const int extraSize = totalSize - m_totalFixedSize; - const int sizeSpacer = extraSize > 0 ? extraSize / numSpaces : 0; + const int sizeSpacer = extraSize > 0 ? extraSize / numSpaces : 1; // the last spacer should consume all remaining space if we have too much // of it (which can be greater than sizeSpacer because of the rounding) const int sizeLastSpacer = extraSize > 0 ? extraSize - (numSpaces - 1)*sizeSpacer - : 0; + : 1; // cumulated offset by which we need to move all the following controls to // the right: while the toolbar takes care of the normal items, we must