]> git.saurik.com Git - wxWidgets.git/commitdiff
Commented out the bitmap-greying code until I have time to debug it
authorJulian Smart <julian@anthemion.co.uk>
Mon, 25 Feb 2002 11:01:31 +0000 (11:01 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 25 Feb 2002 11:01:31 +0000 (11:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/toolbar.cpp

index fea3ac064c4106715c495bd36fcf1c56c943a673..995c4164aa9f601c64b13b67393b50a2d9e7c80e 100644 (file)
@@ -90,6 +90,10 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
 
 void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
 {
+    // TODO: figure out why it gives a BadMatch when
+    // creating the bitmap (out.ConvertToBitmap).
+    // Possibly we should ensure all depths match.
+#if 0
     // Created disabled-state bitmap on demand
     if (!enable && !tool->GetBitmap2().Ok())
     {
@@ -101,6 +105,7 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
         tool->SetBitmap2(out.ConvertToBitmap());
     }
     RefreshTool((wxToolBarTool*) tool);    
+#endif
 }
 
 void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool toggle)
@@ -146,7 +151,7 @@ void wxToolBar::RefreshTool( wxToolBarTool *tool )
 
 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 );