From 423939b29aab373e5da156c857265d7a5604f613 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Sun, 15 Mar 2009 19:03:58 +0000 Subject: [PATCH] On OS X, the button for wxID_HELP should never accept a label, also, tweak sizing for help button in OS X Cocoa case. (fixes #10595) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/button_osx.cpp | 2 +- src/osx/cocoa/button.mm | 2 +- src/osx/window_osx.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osx/button_osx.cpp b/src/osx/button_osx.cpp index a33ef30012..22f2ef156b 100644 --- a/src/osx/button_osx.cpp +++ b/src/osx/button_osx.cpp @@ -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 ; diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm index fb57055cd5..97fd9450ca 100644 --- a/src/osx/cocoa/button.mm +++ b/src/osx/cocoa/button.mm @@ -26,7 +26,7 @@ wxSize wxButton::DoGetBestSize() const { if ( GetId() == wxID_HELP ) - return wxSize( 20 , 20 ) ; + return wxSize( 23 , 23 ) ; wxSize sz = GetDefaultSize() ; diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 1bd647c363..77d8d2121c 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -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 -- 2.45.2