- // contrary to the docs this control only works with iconrefs
- wxMacCreateBitmapButton( &info, m_bmpNormal, kControlContentIconRef );
- err = CreateIconControl(
- MAC_WXHWND(parent->MacGetTopLevelWindowRef()),
- &bounds, &info, false, m_peer->GetControlRefAddr() );
- }
- else
- {
- wxMacCreateBitmapButton( &info, m_bmpNormal );
- err = CreateBevelButtonControl(
- MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, CFSTR(""),
- ((style & wxBU_AUTODRAW) ? kControlBevelButtonSmallBevel : kControlBevelButtonNormalBevel ),
- kControlBehaviorOffsetContents, &info, 0, 0, 0, m_peer->GetControlRefAddr() );
+ const int w = bmp.GetWidth();
+
+ return bmp.GetHeight() == w &&
+ (w == 128 || w == 48 || w == 32 || w == 16);