reverting best size calculations

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-02-26 07:09:13 +00:00
parent eb65cb341b
commit b635e17fef
6 changed files with 6 additions and 6 deletions

View File

@@ -87,7 +87,7 @@ wxSize wxButton::DoGetBestSize() const
{ {
wxSize sz = GetDefaultSize() ; wxSize sz = GetDefaultSize() ;
int wBtn = m_label.Length() * 10 + 12 + 2 * kMacOSXHorizontalBorder ; int wBtn = m_label.Length() * 8 + 12 + 2 * kMacOSXHorizontalBorder ;
if (wBtn > sz.x) sz.x = wBtn; if (wBtn > sz.x) sz.x = wBtn;

View File

@@ -87,7 +87,7 @@ wxSize wxButton::DoGetBestSize() const
{ {
wxSize sz = GetDefaultSize() ; wxSize sz = GetDefaultSize() ;
int wBtn = m_label.Length() * 10 + 12 + 2 * kMacOSXHorizontalBorder ; int wBtn = m_label.Length() * 8 + 12 + 2 * kMacOSXHorizontalBorder ;
if (wBtn > sz.x) sz.x = wBtn; if (wBtn > sz.x) sz.x = wBtn;

View File

@@ -433,7 +433,7 @@ void wxControl::MacAdjustControlRect()
{ {
if ( IsKindOf( CLASSINFO( wxButton ) ) ) if ( IsKindOf( CLASSINFO( wxButton ) ) )
{ {
m_width = m_label.Length() * 10 + 12 ; m_width = m_label.Length() * 8 + 12 ;
if ( m_width < 70 ) if ( m_width < 70 )
m_width = 70 ; m_width = 70 ;
} }

View File

@@ -84,7 +84,7 @@ wxSize wxToggleButton::DoGetBestSize() const
int wBtn = 70 ; int wBtn = 70 ;
int hBtn = 20 ; int hBtn = 20 ;
int lBtn = m_label.Length() * 10 + 12 ; int lBtn = m_label.Length() * 8 + 12 ;
if (lBtn > wBtn) if (lBtn > wBtn)
wBtn = lBtn; wBtn = lBtn;

View File

@@ -433,7 +433,7 @@ void wxControl::MacAdjustControlRect()
{ {
if ( IsKindOf( CLASSINFO( wxButton ) ) ) if ( IsKindOf( CLASSINFO( wxButton ) ) )
{ {
m_width = m_label.Length() * 10 + 12 ; m_width = m_label.Length() * 8 + 12 ;
if ( m_width < 70 ) if ( m_width < 70 )
m_width = 70 ; m_width = 70 ;
} }

View File

@@ -84,7 +84,7 @@ wxSize wxToggleButton::DoGetBestSize() const
int wBtn = 70 ; int wBtn = 70 ;
int hBtn = 20 ; int hBtn = 20 ;
int lBtn = m_label.Length() * 10 + 12 ; int lBtn = m_label.Length() * 8 + 12 ;
if (lBtn > wBtn) if (lBtn > wBtn)
wBtn = lBtn; wBtn = lBtn;