Use the real bitmap size instead of the default tool size when creating the
disabled image list as the actual bitmap size could be less than the default
one and in this case adding images to the image list later would fail (as
could be seen by using custom bitmaps in the toolbar sample).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67044
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxBitmap bmpDisabled = tool->GetDisabledBitmap();
if ( bmpDisabled.Ok() )
{
+ const wxSize sizeBitmap = bmpDisabled.GetSize();
m_disabledImgList = new wxImageList
(
- m_defaultWidth,
- m_defaultHeight,
+ sizeBitmap.x,
+ sizeBitmap.y,
bmpDisabled.GetMask() != NULL,
GetToolsCount()
);