// ----------------------------------------------------------------------------
// default margins around the image
-static const wxCoord DEFAULT_BTN_MARGIN_X = 0;
+static const wxCoord DEFAULT_BTN_MARGIN_X = 0; // We should give space for the border, at least.
static const wxCoord DEFAULT_BTN_MARGIN_Y = 0;
// ============================================================================
void wxButton::SetImageMargins(wxCoord x, wxCoord y)
{
- m_marginBmpX = x;
- m_marginBmpY = y;
-
+ m_marginBmpX = x + 2;
+ m_marginBmpY = y + 2;
+
SetBestSize(wxDefaultSize);
}
// the other mouse buttons are ignored
if ( event.Button(1) )
{
- if ( event.ButtonDown(1) )
+ if ( event.LeftDown() || event.LeftDClick() )
{
m_winCapture = consumer->GetInputWindow();
m_winCapture->CaptureMouse();
return TRUE;
}
- else // up
+ else if ( event.LeftUp() )
{
if ( m_winCapture )
{
//else: the mouse was released outside the window, this doesn't
// count as a click
}
+ //else: don't do anything special about the double click
}
return wxStdInputHandler::HandleMouse(consumer, event);