]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_toolb.cpp
Combine two wxImage-to-pixmap creation functions into one.
[wxWidgets.git] / src / xrc / xh_toolb.cpp
index ba53f016f08b610c78608ed78edd86b92fdb1ed7..f89cc657c1370a2accc6686b3e05555cbdaa8f4c 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        xh_toolb.cpp
+// Name:        src/xrc/xh_toolb.cpp
 // Purpose:     XRC resource for wxBoxSizer
 // Author:      Vaclav Slavik
 // Created:     2000/08/11
 #if wxUSE_XRC && wxUSE_TOOLBAR
 
 #include "wx/xrc/xh_toolb.h"
-#include "wx/toolbar.h"
-#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/frame.h"
+    #include "wx/toolbar.h"
+#endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
 
@@ -118,6 +121,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
         long separation = GetLong(wxT("separation"), -1);
         if (separation != -1)
             toolbar->SetToolSeparation(separation);
+        if (HasParam(wxT("bg")))
+            toolbar->SetBackgroundColour(GetColour(wxT("bg")));
 
         wxXmlNode *children_node = GetParamNode(wxT("object"));
         if (!children_node)