From b635e17fef75d05881f5b5db85ec5f21d1cb3750 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 26 Feb 2004 07:09:13 +0000 Subject: [PATCH] reverting best size calculations git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/button.cpp | 2 +- src/mac/carbon/button.cpp | 2 +- src/mac/carbon/control.cpp | 2 +- src/mac/carbon/tglbtn.cpp | 2 +- src/mac/control.cpp | 2 +- src/mac/tglbtn.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mac/button.cpp b/src/mac/button.cpp index cc3685a17d..82e4e34c5f 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -87,7 +87,7 @@ wxSize wxButton::DoGetBestSize() const { 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; diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index cc3685a17d..82e4e34c5f 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -87,7 +87,7 @@ wxSize wxButton::DoGetBestSize() const { 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; diff --git a/src/mac/carbon/control.cpp b/src/mac/carbon/control.cpp index ae57f23ab0..49be26a16c 100644 --- a/src/mac/carbon/control.cpp +++ b/src/mac/carbon/control.cpp @@ -433,7 +433,7 @@ void wxControl::MacAdjustControlRect() { if ( IsKindOf( CLASSINFO( wxButton ) ) ) { - m_width = m_label.Length() * 10 + 12 ; + m_width = m_label.Length() * 8 + 12 ; if ( m_width < 70 ) m_width = 70 ; } diff --git a/src/mac/carbon/tglbtn.cpp b/src/mac/carbon/tglbtn.cpp index 755e1d2f05..aa7ee2bb3e 100644 --- a/src/mac/carbon/tglbtn.cpp +++ b/src/mac/carbon/tglbtn.cpp @@ -84,7 +84,7 @@ wxSize wxToggleButton::DoGetBestSize() const int wBtn = 70 ; int hBtn = 20 ; - int lBtn = m_label.Length() * 10 + 12 ; + int lBtn = m_label.Length() * 8 + 12 ; if (lBtn > wBtn) wBtn = lBtn; diff --git a/src/mac/control.cpp b/src/mac/control.cpp index ae57f23ab0..49be26a16c 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -433,7 +433,7 @@ void wxControl::MacAdjustControlRect() { if ( IsKindOf( CLASSINFO( wxButton ) ) ) { - m_width = m_label.Length() * 10 + 12 ; + m_width = m_label.Length() * 8 + 12 ; if ( m_width < 70 ) m_width = 70 ; } diff --git a/src/mac/tglbtn.cpp b/src/mac/tglbtn.cpp index 755e1d2f05..aa7ee2bb3e 100644 --- a/src/mac/tglbtn.cpp +++ b/src/mac/tglbtn.cpp @@ -84,7 +84,7 @@ wxSize wxToggleButton::DoGetBestSize() const int wBtn = 70 ; int hBtn = 20 ; - int lBtn = m_label.Length() * 10 + 12 ; + int lBtn = m_label.Length() * 8 + 12 ; if (lBtn > wBtn) wBtn = lBtn; -- 2.47.2