From b2b4469be1759c89835d490a4ac608dd252da21d Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 18 Oct 2004 12:38:21 +0000 Subject: [PATCH] wxBitmapButton doesn't need own DoGetBestSize, wxControl's one works (fixes sizing bug) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/bmpbuttn.h | 1 - include/wx/gtk1/bmpbuttn.h | 1 - src/gtk/bmpbuttn.cpp | 14 -------------- src/gtk1/bmpbuttn.cpp | 14 -------------- 4 files changed, 30 deletions(-) diff --git a/include/wx/gtk/bmpbuttn.h b/include/wx/gtk/bmpbuttn.h index f4d71460df..473991447b 100644 --- a/include/wx/gtk/bmpbuttn.h +++ b/include/wx/gtk/bmpbuttn.h @@ -68,7 +68,6 @@ public: protected: virtual void OnSetBitmap(); - virtual wxSize DoGetBestSize() const; void Init(); diff --git a/include/wx/gtk1/bmpbuttn.h b/include/wx/gtk1/bmpbuttn.h index f4d71460df..473991447b 100644 --- a/include/wx/gtk1/bmpbuttn.h +++ b/include/wx/gtk1/bmpbuttn.h @@ -68,7 +68,6 @@ public: protected: virtual void OnSetBitmap(); - virtual wxSize DoGetBestSize() const; void Init(); diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp index 55b275d0bb..7b51da0f9d 100644 --- a/src/gtk/bmpbuttn.cpp +++ b/src/gtk/bmpbuttn.cpp @@ -263,20 +263,6 @@ void wxBitmapButton::OnSetBitmap() } } -wxSize wxBitmapButton::DoGetBestSize() const -{ - wxSize best; - - if (m_bmpNormal.Ok()) - { - int border = HasFlag(wxNO_BORDER) ? 4 : 10; - best.x = m_bmpNormal.GetWidth()+border; - best.y = m_bmpNormal.GetHeight()+border; - } - CacheBestSize(best); - return best; -} - bool wxBitmapButton::Enable( bool enable ) { if ( !wxWindow::Enable(enable) ) diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 55b275d0bb..7b51da0f9d 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -263,20 +263,6 @@ void wxBitmapButton::OnSetBitmap() } } -wxSize wxBitmapButton::DoGetBestSize() const -{ - wxSize best; - - if (m_bmpNormal.Ok()) - { - int border = HasFlag(wxNO_BORDER) ? 4 : 10; - best.x = m_bmpNormal.GetWidth()+border; - best.y = m_bmpNormal.GetHeight()+border; - } - CacheBestSize(best); - return best; -} - bool wxBitmapButton::Enable( bool enable ) { if ( !wxWindow::Enable(enable) ) -- 2.45.2