Return smaller images for wxART_MENU/BUTTON under OS X.

Requesting images with client id of wxART_MENU/BUTTON used to return the large
32*32 icons because GetNativeSizeHint() wasn't implemented for these client
ids.

Moreover, under Mac some icons (notably message box ones) are created from the
corresponding icon bundle and the code in wxArtProvider::GetBitmap() didn't
resize them correctly in this case, fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-05 22:57:24 +00:00
parent 5c67a53d87
commit 1d3dfc57e7
2 changed files with 23 additions and 11 deletions

View File

@@ -117,6 +117,14 @@ wxSize wxArtProvider::GetNativeSizeHint(const wxArtClient& client)
// "32 x 32 pixels is the recommended size"
return wxSize(32, 32);
}
else if ( client == wxART_BUTTON || client == wxART_MENU )
{
// Mac UI doesn't use any images in neither buttons nor menus in
// general but the code using wxArtProvider can use wxART_BUTTON to
// find the icons of a roughly appropriate size for the buttons and
// 16x16 seems to be the best choice for this kind of use
return wxSize(16, 16);
}
return wxDefaultSize;
}