From 97786ab70f8ee33532b83af6fadad4129e1570e1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 28 Oct 2004 16:47:39 +0000 Subject: [PATCH] fixed wxBU_EXACTFIT handling in wxBitmapButton (closes 1056234) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 3 ++- src/msw/bmpbuttn.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 656d436e48..afc990aefc 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -231,7 +231,8 @@ wxMac: wxMSW: - fixed enhanced metafiles loading from files (Andreas Goebel) -- Group of wxRadioButtons no longer have to be consecutive +- wxRadioButtons no longer have to be consecutive in a group +- fixed wxBU_EXACTFIT handling in wxBitmapButton 2.5.3 diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index d40d422eda..af0014cf67 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -505,10 +505,10 @@ wxSize wxBitmapButton::DoGetBestSize() const if ( !HasFlag(wxBU_EXACTFIT) ) { wxSize sz = GetDefaultSize(); - if (best.x > sz.x) - sz.x = best.x; - if (best.y > sz.y) - sz.y = best.y; + if ( best.x < sz.x ) + best.x = sz.x; + if ( best.y < sz.y ) + best.y = sz.y; } return best; -- 2.45.2