]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/tbarsmpl.cpp
workaround for MGL's weirdness: won't render rectangles of w=1 or h=1
[wxWidgets.git] / src / generic / tbarsmpl.cpp
index c019f0f43f7d9ca344baea52386b1032e8a83974..dd79b926b4ec3d110576f7151b4b9830f165c624 100644 (file)
@@ -234,8 +234,7 @@ bool wxToolBarSimple::Create(wxWindow *parent,
         return FALSE;
 
     // Set it to grey (or other 3D face colour)
-    wxSystemSettings settings;
-    SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_3DFACE));
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
 
     if ( GetWindowStyleFlag() & wxTB_VERTICAL )
     {
@@ -557,7 +556,8 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase)
 
 #if wxUSE_PALETTE
 #ifndef __WXGTK__
-        memDC.SetPalette(wxNullPalette);
+        if (bitmap.GetPalette())
+            memDC.SetPalette(wxNullPalette);
 #endif
 #endif // wxUSE_PALETTE
     }