diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 8f0acde1a9..fd05a25f53 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -619,8 +619,10 @@ wxSize wxBitmapButton::DoGetBestSize() const // them and it just makes them appear larger than needed if ( !HasFlag(wxBORDER_NONE) ) { - marginH = margins.cxLeftWidth + margins.cxRightWidth; - marginV = margins.cyTopHeight + margins.cyBottomHeight; + // we need 2 extra pixels for the focus rectangle, without them + // it's overwritten by the bitmap itself + marginH = margins.cxLeftWidth + margins.cxRightWidth + 2; + marginV = margins.cyTopHeight + margins.cyBottomHeight + 2; } } else