Merge branch 'mac-def-bmpbtn-margins'

Stop using wxBU_AUTODRAW under Mac and everywhere else.

See https://github.com/wxWidgets/wxWidgets/pull/859

Closes #18170.
This commit is contained in:
Vadim Zeitlin
2018-07-24 15:17:32 +02:00
15 changed files with 25 additions and 30 deletions

View File

@@ -25,7 +25,7 @@
#define wxBU_BOTTOM 0x0200
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
// These two flags are obsolete
// These two flags are obsolete and have no effect any longer.
#define wxBU_NOAUTODRAW 0x0000
#define wxBU_AUTODRAW 0x0004

View File

@@ -73,7 +73,7 @@ public:
wxWindowID id = wxID_CONTEXT_HELP,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW)
long style = 0)
{
Create(parent, id, pos, size, style);
}
@@ -83,7 +83,7 @@ public:
wxWindowID id = wxID_CONTEXT_HELP,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW);
long style = 0);
void OnContextHelp(wxCommandEvent& event);

View File

@@ -24,7 +24,7 @@ public:
const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
@@ -38,7 +38,7 @@ public:
const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);

View File

@@ -22,7 +22,7 @@ public:
virtual ~wxBitmapButton();
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
@@ -31,7 +31,7 @@ public:
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);

View File

@@ -25,7 +25,7 @@ public:
const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
@@ -37,7 +37,7 @@ public:
const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);

View File

@@ -20,12 +20,11 @@ class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
public:
wxBitmapButton()
{
SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN);
}
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
@@ -34,7 +33,7 @@ public:
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);