From 1d6e3e3693ecaccbb823947f3ca87220fcec3e95 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 21 Oct 2021 00:33:22 +0100 Subject: [PATCH] Move wxStaticBitmapBase methods to the appropriate file For some reason, wxStaticBitmapBase methods were defined in the wrong ctrlcmn.cpp file rather than statbmpcmn.cpp. Just move them there to avoid confusion. No real changes. This commit is best viewed with --color-moved git option. --- src/common/ctrlcmn.cpp | 20 -------------------- src/common/statbmpcmn.cpp | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index 6549e59461..c721565753 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -620,24 +620,4 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc, return ret; } -// ---------------------------------------------------------------------------- -// wxStaticBitmap -// ---------------------------------------------------------------------------- - -#if wxUSE_STATBMP - -wxStaticBitmapBase::~wxStaticBitmapBase() -{ - // this destructor is required for Darwin -} - -wxSize wxStaticBitmapBase::DoGetBestSize() const -{ - // the fall back size is completely arbitrary - const wxBitmap bmp = GetBitmap(); - return bmp.IsOk() ? bmp.GetScaledSize() : wxSize(16, 16); -} - -#endif // wxUSE_STATBMP - #endif // wxUSE_CONTROLS diff --git a/src/common/statbmpcmn.cpp b/src/common/statbmpcmn.cpp index be4b210721..d2c4f8c26b 100644 --- a/src/common/statbmpcmn.cpp +++ b/src/common/statbmpcmn.cpp @@ -80,4 +80,20 @@ wxCONSTRUCTOR_5( wxStaticBitmap, wxWindow*, Parent, wxWindowID, Id, \ bitmap */ +// ---------------------------------------------------------------------------- +// wxStaticBitmap +// ---------------------------------------------------------------------------- + +wxStaticBitmapBase::~wxStaticBitmapBase() +{ + // this destructor is required for Darwin +} + +wxSize wxStaticBitmapBase::DoGetBestSize() const +{ + // the fall back size is completely arbitrary + const wxBitmap bmp = GetBitmap(); + return bmp.IsOk() ? bmp.GetScaledSize() : wxSize(16, 16); +} + #endif // wxUSE_STATBMP