X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a290fa5a7deebe9d96c0c0089d18e27d4bd9b624..154ad28bb3f19b842b028b03d5f598dedcf8803c:/src/univ/button.cpp diff --git a/src/univ/button.cpp b/src/univ/button.cpp index 821843ff1c..613ff0c3d7 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -41,6 +41,7 @@ #include "wx/univ/inphand.h" #include "wx/univ/theme.h" #include "wx/univ/colschem.h" +#include "wx/stockitem.h" // ---------------------------------------------------------------------------- // constants @@ -69,13 +70,17 @@ void wxButton::Init() bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, - const wxString &label, + const wxString &lbl, const wxPoint &pos, const wxSize &size, long style, const wxValidator& validator, const wxString &name) { + wxString label(lbl); + if (label.empty() && wxIsStockID(id)) + label = wxGetStockLabel(id); + // center label by default if ( !(style & wxALIGN_MASK) ) {