From f8a7323cbbaff64ef701f83adba4ca47ea5d8aaa Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Mar 2014 20:58:20 +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/trunk@76108 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 3dbff0f32b..56f983086b 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -1932,8 +1932,7 @@ bool wxToolBar::HandlePaint(WXWPARAM wParam, WXLPARAM lParam) } else { - rcItem.top = 0; - rcItem.bottom = rectTotal.height; + rcItem.bottom = rcItem.top + rectTotal.height / m_maxRows; } // Apparently, regions of height < 3 are not taken into account