Fix rendering of owner-drawn multi-column menus in wxMSW

Compute the item rectangle bounds correctly for the items in non-first column.

See #17072.

(cherry picked from commit 61083f4871)
This commit is contained in:
Pete Bannister
2016-09-09 23:39:20 +02:00
committed by Vadim Zeitlin
parent 48841ad703
commit d4ae8219d9
2 changed files with 3 additions and 1 deletions

View File

@@ -629,6 +629,7 @@ wxGTK:
wxMSW:
- Fix compilation with g++ 4.9 in non-C++11 mode.
- Fix rendering of owner drawn multi-column menus (Pete Bannister).
- Fix regression in accessibility support (Leland Lucius).
- Fix regression in wxDC drawing with bottom-to-top y axis (Artur Wieczorek).
- Fix compilation with C++Builder XE compiler (Nichka).

View File

@@ -873,7 +873,8 @@ bool wxMenuItem::OnDrawItem(wxDC& dc, const wxRect& rc,
data->SeparatorMargin.ApplyTo(rcSeparator);
RECT rcGutter = rcSelection;
rcGutter.right = data->ItemMargin.cxLeftWidth
rcGutter.right = rcGutter.left
+ data->ItemMargin.cxLeftWidth
+ data->CheckBgMargin.cxLeftWidth
+ data->CheckMargin.cxLeftWidth
+ imgWidth