// ----------------------------------------------------------------------------
#ifdef __GNUG__
- #pragma implementation "button.h"
+ #pragma implementation "univbutton.h"
#endif
#include "wx/wxprec.h"
// 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);
}