// for compatibility with other ports, the buttons default size is never
// less than the standard one
- wxSize szDef = GetDefaultSize();
- if ( width < szDef.x )
- width = szDef.x;
+ if ( !(GetWindowStyle() & wxBU_EXACTFIT) )
+ {
+ wxSize szDef = GetDefaultSize();
+ if ( width < szDef.x )
+ width = szDef.x;
+ }
return wxSize(width, height);
}
void wxButton::DoDraw(wxControlRenderer *renderer)
{
- renderer->DrawButtonBorder();
+ if ( !(GetWindowStyle() & wxBORDER_NONE) )
+ {
+ renderer->DrawButtonBorder();
+ }
+
renderer->DrawLabel(m_bitmap, m_marginBmpX, m_marginBmpY);
}