void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
{
+ // Comment this out if you don't want the disabled look,
+ // which currently acts weirdly for the scissors icon
+ // in the toolbar sample. See src/common/tbarbase.cpp
+ // for the wxCreateGreyedImage function.
+#if 1
// Created disabled-state bitmap on demand
if (!enable && !tool->GetBitmap2().Ok())
{
tool->SetBitmap2(out.ConvertToBitmap());
}
RefreshTool((wxToolBarTool*) tool);
+#endif
}
void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool toggle)
void wxToolBar::DrawToolBarTool( wxToolBarTool *tool, wxDC &dc, bool down )
{
- const wxBitmap& bitmap = (tool->IsEnabled() || !tool->GetBitmap1().Ok()) ? tool->GetBitmap1() : tool->GetBitmap2() ;
+ const wxBitmap& bitmap = (tool->IsEnabled() || !tool->GetBitmap2().Ok()) ? tool->GetBitmap1() : tool->GetBitmap2() ;
if (down)
{
dc.DrawBitmap( bitmap, tool->m_x+4, tool->m_y+4, TRUE );