Add wxHAS_SVG feature test macro

This is more clear and future-proof than using wxHAS_RAW_BITMAP for
checking for SVG availability.
This commit is contained in:
Vadim Zeitlin
2021-10-05 16:12:01 +01:00
parent 0216654272
commit fb4e188cea
6 changed files with 21 additions and 10 deletions

View File

@@ -421,8 +421,10 @@ void MyFrame::PopulateToolbar(wxToolBarBase* toolBar)
const wxSize sizeBitmap = toolBarBitmaps[Tool_new].GetDefaultSize() *
(m_smallToolbar ? 1 : 2);
#ifdef wxHAS_SVG
// Use vector SVG image for this button for demonstration purposes.
toolBarBitmaps[Tool_about] = wxBitmapBundle::FromSVG(svg_data, sizeBitmap);
#endif // wxHAS_SVG
// Note that there is no need for FromDIP() here, wxMSW will adjust the
// size on its own and under the other platforms there is no need for