always use wxBU_NOTEXT and wxBU_EXACTFIT for wxBitmapButton under all platforms (which required some refactoring) (hopefully really closes #10927)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-06-28 16:14:37 +00:00
parent 79e38eaf2a
commit 8e4c291246
5 changed files with 47 additions and 8 deletions

View File

@@ -34,6 +34,18 @@ bool wxButton::Create(wxWindow *parent,
const wxValidator& validator,
const wxString& name)
{
// FIXME: this hack is needed because we're called from
// wxBitmapButton::Create() with this style and we currently use a
// different wxWidgetImpl method (CreateBitmapButton() rather than
// CreateButton()) for creating bitmap buttons, but we really ought
// to unify the creation of buttons of all kinds and then remove
// this check
if ( style & wxBU_NOTEXT )
{
return wxControl::Create(parent, id, lbl, pos, size, style,
validator, name);
}
wxString label(lbl);
if (label.empty() && wxIsStockID(id) && !(id == wxID_HELP))
label = wxGetStockLabel(id);