X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a7d4d7190771e7acb15ccbc919e233bb6cb1038..03a126c68c940c13a7a6c9ee183fa88e9b575a21:/src/common/iconbndl.cpp?ds=inline diff --git a/src/common/iconbndl.cpp b/src/common/iconbndl.cpp index f5b2b2cafe..2d3074716b 100644 --- a/src/common/iconbndl.cpp +++ b/src/common/iconbndl.cpp @@ -54,7 +54,7 @@ public: protected: wxIconArray m_icons; - friend class WXDLLEXPORT wxIconBundle; + friend class wxIconBundle; }; // ============================================================================ @@ -191,6 +191,18 @@ wxIcon wxIconBundle::GetIcon(const wxSize& size) const #endif } +wxIcon wxIconBundle::GetIconOfExactSize(const wxSize& size) const +{ + wxIcon icon = GetIcon(size); + if ( icon.Ok() && + (icon.GetWidth() != size.x || icon.GetHeight() != size.y) ) + { + icon = wxNullIcon; + } + + return icon; +} + void wxIconBundle::AddIcon(const wxIcon& icon) { wxCHECK_RET( icon.IsOk(), _T("invalid icon") );