wxArtProvider::GetIconBundle() cleanup:
* makes GetIcon() and GetBitmap() behave in the same way again (i.e. GetBitmap falls back to CreateIconBundle too) * GetIcon() used to call CreateIconBundle() first, before CreateBitmap() - this doesn't make sense, inverted * GetIconBundle() falls back to GetIcon() if provider's CreateIconBundle() doesn't return anything and vice versa: GetIcon()/GetBitmap() falls back to GetIconBundle() if CreateBitmap() doesn't return anything git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
class wxMacArtProvider : public wxArtProvider
|
||||
{
|
||||
protected:
|
||||
virtual wxBitmap CreateBitmap(const wxArtID& id, const wxArtClient& client,
|
||||
const wxSize& size);
|
||||
virtual wxIconBundle CreateIconBundle(const wxArtID& id,
|
||||
const wxArtClient& client);
|
||||
};
|
||||
@@ -105,24 +103,6 @@ wxIconBundle wxMacArtProvider::CreateIconBundle(const wxArtID& id, const wxArtCl
|
||||
return wxMacArtProvider_CreateIconBundle(id);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// CreateBitmap
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxBitmap wxMacArtProvider::CreateBitmap(const wxArtID& id,
|
||||
const wxArtClient& client,
|
||||
const wxSize& reqSize)
|
||||
{
|
||||
wxIconBundle ic(CreateIconBundle(id, client));
|
||||
if (ic.IsOk())
|
||||
{
|
||||
wxIcon theIcon(ic.GetIcon(reqSize));
|
||||
return wxBitmap(theIcon);
|
||||
}
|
||||
|
||||
return wxNullBitmap;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxArtProvider::GetNativeSizeHint()
|
||||
|
Reference in New Issue
Block a user