X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af498247c5ea024a781d0ef8d30cbbfb44749641..020707bba9c960c155f4257d9a027d6aecdae5b8:/src/msw/bmpbuttn.cpp diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index bb2e787838..7788ce8b2b 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -126,25 +126,11 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, m_marginY = wxDEFAULT_BUTTON_MARGIN; } - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; - if (id == -1) m_windowId = NewControlId(); else m_windowId = id; - if ( bitmap.Ok() ) - { - wxSize newSize = DoGetBestSize(); - if ( width == -1 ) - width = newSize.x; - if ( height == -1 ) - height = newSize.y; - } - long msStyle = WS_VISIBLE | WS_TABSTOP | WS_CHILD | BS_OWNERDRAW ; if ( m_windowStyle & wxCLIP_SIBLINGS ) @@ -176,9 +162,8 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, // Subclass again for purposes of dialog editing mode SubclassWin(m_hWnd); - SetFont(parent->GetFont()); - - SetSize(x, y, width, height); + SetPosition(pos); + SetBestSize(size); return true; }