Applied patch for better sizing of bitmap buttons.

Applied patch for correct order of activate and mouse down events.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2003-09-09 13:05:50 +00:00
parent 411bdf7415
commit 827e7a4874
4 changed files with 28 additions and 10 deletions

View File

@@ -1540,9 +1540,12 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
}
else
{
// Activate window first
::SelectWindow( window ) ;
// Send event later
if ( win )
win->MacMouseDown( ev , windowPart ) ;
::SelectWindow( window ) ;
}
}
else

View File

@@ -35,11 +35,17 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
m_bmpNormal = bitmap;
m_marginX = 0;
m_marginY = 0;
if (style & wxBU_AUTODRAW)
{
m_marginX = wxDEFAULT_BUTTON_MARGIN;
m_marginY = wxDEFAULT_BUTTON_MARGIN;
}
else
{
m_marginX = 0;
m_marginY = 0;
}
// int x = pos.x;
// int y = pos.y;
int width = size.x;
int height = size.y;

View File

@@ -1540,9 +1540,12 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
}
else
{
// Activate window first
::SelectWindow( window ) ;
// Send event later
if ( win )
win->MacMouseDown( ev , windowPart ) ;
::SelectWindow( window ) ;
}
}
else

View File

@@ -35,11 +35,17 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
m_bmpNormal = bitmap;
m_marginX = 0;
m_marginY = 0;
if (style & wxBU_AUTODRAW)
{
m_marginX = wxDEFAULT_BUTTON_MARGIN;
m_marginY = wxDEFAULT_BUTTON_MARGIN;
}
else
{
m_marginX = 0;
m_marginY = 0;
}
// int x = pos.x;
// int y = pos.y;
int width = size.x;
int height = size.y;