Make toggle toolbar button emulation on OS X nicer

Actually use gray background behind toggled icon. Remove the ugly black
frame. Increase rounded rectangle's radius so that it is (barely)
visible that the rectangle is rounded.

Previously, the code used wxLIGHT_GREY by mistake, which is the same
color as the toolbar already uses, so toggled items were rendered with
the same background as untoggled, only with an ugly black rectangle
around them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2014-09-25 12:29:34 +00:00
parent e5affe951b
commit 98a045f86b

View File

@@ -537,9 +537,9 @@ void wxToolBarTool::UpdateImages()
wxMemoryDC dc;
dc.SelectObject( m_alternateBitmap );
dc.SetPen( wxPen(*wxBLACK) );
dc.SetBrush( wxBrush( *wxLIGHT_GREY ));
dc.DrawRoundedRectangle( 0, 0, w, h, 2 );
dc.SetPen(*wxGREY_PEN);
dc.SetBrush(*wxGREY_BRUSH);
dc.DrawRoundedRectangle( 0, 0, w, h, 3 );
dc.DrawBitmap( m_bmpNormal, 0, 0, true );
dc.SelectObject( wxNullBitmap );