X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80806624f897e226807a910d2e51e3e63d0785de..d4597e138eff53fccbcb41259e8cb7ab2db3bab9:/src/generic/tbarsmpl.cpp diff --git a/src/generic/tbarsmpl.cpp b/src/generic/tbarsmpl.cpp index 7ddf168ec6..10f4cf1103 100644 --- a/src/generic/tbarsmpl.cpp +++ b/src/generic/tbarsmpl.cpp @@ -509,8 +509,8 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase) PrepareDC(dc); wxPen dark_grey_pen(wxColour( 85,85,85 ), 1, wxSOLID); - wxPen white_pen("WHITE", 1, wxSOLID); - wxPen black_pen("BLACK", 1, wxSOLID); + wxPen white_pen(wxT("WHITE"), 1, wxSOLID); + wxPen black_pen(wxT("BLACK"), 1, wxSOLID); wxBitmap bitmap = tool->GetBitmap(); @@ -557,7 +557,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 } @@ -612,7 +613,7 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase) wxCoord y = tool->m_y; wxCoord w = bitmap.GetWidth(); wxCoord h = bitmap.GetHeight(); - wxPen thick_black_pen("BLACK", 3, wxSOLID); + wxPen thick_black_pen(wxT("BLACK"), 3, wxSOLID); memDC.SelectObject(bitmap); dc.SetClippingRegion(tool->m_x, tool->m_y, w, h);