git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57906
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
private:
wxBitmap m_bitmap;
private:
wxBitmap m_bitmap;
+ int m_marginX,
+ m_marginY;
+
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
+ m_marginX =
+ m_marginY = wxDEFAULT_BUTTON_MARGIN;
+
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
{
if (!m_bitmap.IsOk())
return wxSize(20,20);
{
if (!m_bitmap.IsOk())
return wxSize(20,20);
-
- return wxSize ( m_bitmap.GetWidth()+6, m_bitmap.GetHeight()+6 ) ;
+
+ wxSize best;
+ best.x = m_bitmap.GetWidth() + 2 * m_marginX;
+ best.y = m_bitmap.GetHeight() + 2 * m_marginY;
+
+ return best;
}
void wxBitmapToggleButton::SetValue(bool val)
}
void wxBitmapToggleButton::SetValue(bool val)