From 01c6b63c3fb01b37014ef73875f77d7938fc03bf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Mar 2014 20:55:59 +0000 Subject: [PATCH] Fix background painting of multi-row toolbars in wxMSW. The item rectangle used wrong vertical coordinates which didn't matter (much?) for the single row toolbars but was completely wrong for toolbars with more than one row. Don't always anchor the rectangle at the window top to avoid this. See #13579. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/toolbar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index 81b5772245..70acc404da 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -1886,8 +1886,7 @@ bool wxToolBar::HandlePaint(WXWPARAM wParam, WXLPARAM lParam) } else { - rcItem.top = 0; - rcItem.bottom = rectTotal.height; + rcItem.bottom = rcItem.top + rectTotal.height / m_maxRows; } rgnDummySeps.Union(wxRectFromRECT(rcItem));