From 070bc8bd290d8072143c15f9a3e4ce5181ae2a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 23 May 2022 11:35:11 +0200 Subject: [PATCH] Implement wxBitmapBundle::GetBitmap() on macOS Implement wxOSXImageBundleImpl::GetBitmap() to return the underlying NSImage. This ignores size, because NSImage - and so wxBitmap - already is multi-resolution representation. This un-breaks loading bundle bitmaps via wxArtProvider, which previously used NSImage to load multi-resolution bitmap into wxBitmap, but lost the ability to return simple bitmaps in the wxBitmapBundle conversion. See #22449. --- src/osx/core/bmpbndl.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/core/bmpbndl.mm b/src/osx/core/bmpbndl.mm index f5e364011e..8810a2576d 100644 --- a/src/osx/core/bmpbndl.mm +++ b/src/osx/core/bmpbndl.mm @@ -148,7 +148,7 @@ wxSize wxOSXImageBundleImpl::GetPreferredBitmapSizeAtScale(double scale) const wxBitmap wxOSXImageBundleImpl::GetBitmap(const wxSize& WXUNUSED(size)) { - return wxBitmap(); + return wxBitmap(wxOSXGetImageFromBundleImpl(this)); } wxBitmapBundle wxOSXMakeBundleFromImage( WXImage img)