From e7096e85d2966e068d45a49bbc27100c74c815c3 Mon Sep 17 00:00:00 2001 From: Jouk Date: Fri, 25 Feb 2022 08:29:20 +0100 Subject: [PATCH] Fix combo sample build without wxHAS_SVG Just don't use bitmaps at all if SVG support is unavailable. Closes #22161. --- samples/combo/combo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/combo/combo.cpp b/samples/combo/combo.cpp index 5e0c4479f6..59399d839b 100644 --- a/samples/combo/combo.cpp +++ b/samples/combo/combo.cpp @@ -538,7 +538,9 @@ public: style | wxCC_STD_BUTTON, validator,name); +#ifdef wxHAS_SVG SetButtonBitmaps(wxBitmapBundle::FromSVGFile("three-dots.svg", wxSize(16, 16)), true); +#endif } virtual void OnButtonClick() wxOVERRIDE @@ -827,6 +829,7 @@ MyFrame::MyFrame(const wxString& title) ); // Load images from disk +#ifdef wxHAS_SVG wxBitmapBundle bmpNormal = wxBitmapBundle::FromSVGFile("dropbutn.svg", wxSize(16, 16)); wxBitmapBundle bmpPressed = wxBitmapBundle::FromSVGFile("dropbutp.svg", wxSize(16, 16)); wxBitmapBundle bmpHover = wxBitmapBundle::FromSVGFile("dropbuth.svg", wxSize(16, 16)); @@ -838,6 +841,7 @@ MyFrame::MyFrame(const wxString& title) } else wxLogError("Dropbutton images not found"); +#endif //odc2->SetButtonPosition(0, // width adjustment // 0, // height adjustment