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/trunk@77883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2014-09-25 12:29:22 +00:00
parent 73eaaa97c3
commit 5d0c8c9302

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 );