]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/toolbar.cpp
fixed linking errors
[wxWidgets.git] / src / univ / toolbar.cpp
index fea3ac064c4106715c495bd36fcf1c56c943a673..f856622df238846aa6d82c2d6123c6fa975c1351 100644 (file)
@@ -90,6 +90,11 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
 
 void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
 {
 
 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())
     {
     // Created disabled-state bitmap on demand
     if (!enable && !tool->GetBitmap2().Ok())
     {
@@ -101,6 +106,7 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
         tool->SetBitmap2(out.ConvertToBitmap());
     }
     RefreshTool((wxToolBarTool*) tool);    
         tool->SetBitmap2(out.ConvertToBitmap());
     }
     RefreshTool((wxToolBarTool*) tool);    
+#endif
 }
 
 void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool toggle)
 }
 
 void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool toggle)
@@ -146,7 +152,7 @@ void wxToolBar::RefreshTool( wxToolBarTool *tool )
 
 void wxToolBar::DrawToolBarTool( wxToolBarTool *tool, wxDC &dc, bool down )
 {
 
 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 );
     if (down)
     {
         dc.DrawBitmap( bitmap, tool->m_x+4, tool->m_y+4, TRUE );