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
This commit is contained in:
@@ -68,7 +68,6 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void OnSetBitmap();
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
void Init();
|
||||
|
||||
|
@@ -68,7 +68,6 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void OnSetBitmap();
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
void Init();
|
||||
|
||||
|
@@ -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) )
|
||||
|
@@ -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) )
|
||||
|
Reference in New Issue
Block a user