]> git.saurik.com Git - wxWidgets.git/commitdiff
added back 2 extra pixels for the best size under XP
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Jun 2006 09:10:02 +0000 (09:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Jun 2006 09:10:02 +0000 (09:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/bmpbuttn.cpp

index 8f0acde1a926be3f57df3f6682e5d81eee5d6770..fd05a25f537711935ca0b12be3c6899cb0ce1d3b 100644 (file)
@@ -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