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:
@@ -1540,9 +1540,12 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Activate window first
|
||||||
|
::SelectWindow( window ) ;
|
||||||
|
|
||||||
|
// Send event later
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacMouseDown( ev , windowPart ) ;
|
win->MacMouseDown( ev , windowPart ) ;
|
||||||
::SelectWindow( window ) ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -35,11 +35,17 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
|||||||
|
|
||||||
m_bmpNormal = bitmap;
|
m_bmpNormal = bitmap;
|
||||||
|
|
||||||
m_marginX = 0;
|
if (style & wxBU_AUTODRAW)
|
||||||
m_marginY = 0;
|
{
|
||||||
|
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 width = size.x;
|
||||||
int height = size.y;
|
int height = size.y;
|
||||||
|
|
||||||
|
@@ -1540,9 +1540,12 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Activate window first
|
||||||
|
::SelectWindow( window ) ;
|
||||||
|
|
||||||
|
// Send event later
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacMouseDown( ev , windowPart ) ;
|
win->MacMouseDown( ev , windowPart ) ;
|
||||||
::SelectWindow( window ) ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -35,11 +35,17 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
|||||||
|
|
||||||
m_bmpNormal = bitmap;
|
m_bmpNormal = bitmap;
|
||||||
|
|
||||||
m_marginX = 0;
|
if (style & wxBU_AUTODRAW)
|
||||||
m_marginY = 0;
|
{
|
||||||
|
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 width = size.x;
|
||||||
int height = size.y;
|
int height = size.y;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user