]> git.saurik.com Git - wxWidgets.git/commitdiff
On OS X, the button for wxID_HELP should never accept a label, also, tweak sizing...
authorKevin Ollivier <kevino@theolliviers.com>
Sun, 15 Mar 2009 19:03:58 +0000 (19:03 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Sun, 15 Mar 2009 19:03:58 +0000 (19:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/button_osx.cpp
src/osx/cocoa/button.mm
src/osx/window_osx.cpp

index a33ef300123d3753b1be1563382cd5e1dce0bdfd..22f2ef156bdbcd05ebbb2a44f8cc681fbd48facf 100644 (file)
@@ -35,7 +35,7 @@ bool wxButton::Create(wxWindow *parent,
     const wxString& name)
 {
     wxString label(lbl);
-    if (label.empty() && wxIsStockID(id))
+    if (label.empty() && wxIsStockID(id) && !(id == wxID_HELP))
         label = wxGetStockLabel(id);
 
     m_macIsUserPane = false ;
index fb57055cd552dc862758d91210bab2ae2c436af8..97fd9450ca69533cdaf89855b7d037e26016f657 100644 (file)
@@ -26,7 +26,7 @@
 wxSize wxButton::DoGetBestSize() const
 {
     if ( GetId() == wxID_HELP )
-        return wxSize( 20 , 20 ) ;
+        return wxSize( 23 , 23 ) ;
 
     wxSize sz = GetDefaultSize() ;
 
index 1bd647c363cec146b46468fed4a168c57b1504c1..77d8d2121c7d93581892a9c3fe82c91a78cd4758 100644 (file)
@@ -1044,7 +1044,7 @@ void wxWindowMac::SetLabel(const wxString& title)
 {
     m_label = title ;
 
-    if ( m_peer && m_peer->IsOk() )
+    if ( m_peer && m_peer->IsOk() && !(IsKindOf( CLASSINFO(wxButton) ) && GetId() == wxID_HELP) )
         m_peer->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics), GetFont().GetEncoding() ) ;
 
     // do not trigger refreshes upon invisible and possible partly created objects