//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxBitmapButton;
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxBitmapButton;
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
if (g_blockEventsOnDrag) return;
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
if (g_blockEventsOnDrag) return;
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
- if (newSize.x == -1) newSize.x = m_bitmap.GetHeight()+10;
- if (newSize.y == -1) newSize.y = m_bitmap.GetWidth()+10;
+ int border = 10;
+ if (style & wxNO_BORDER) border = 4;
+ if (newSize.x == -1) newSize.x = m_bitmap.GetWidth()+border;
+ if (newSize.y == -1) newSize.y = m_bitmap.GetHeight()+border;
SetSize( newSize.x, newSize.y );
gtk_signal_connect( GTK_OBJECT(m_widget), "clicked",
SetSize( newSize.x, newSize.y );
gtk_signal_connect( GTK_OBJECT(m_widget), "clicked",
gtk_signal_connect( GTK_OBJECT(m_widget), "released",
GTK_SIGNAL_FUNC(gtk_bmpbutton_release_callback), (gpointer*)this );
gtk_signal_connect( GTK_OBJECT(m_widget), "released",
GTK_SIGNAL_FUNC(gtk_bmpbutton_release_callback), (gpointer*)this );
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
gtk_widget_grab_default( m_widget );
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
gtk_widget_grab_default( m_widget );