From aceeebce6d61c9f239a08ab53e669ad040deee96 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 24 Jun 2006 09:10:02 +0000 Subject: [PATCH] added back 2 extra pixels for the best size under XP git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/bmpbuttn.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.45.2