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.
This commit is contained in:
Václav Slavík 2022-05-23 11:35:11 +02:00 committed by Vadim Zeitlin
parent 080b0f65cb
commit 070bc8bd29

View file

@ -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)