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
This commit is contained in:
@@ -35,7 +35,7 @@ bool wxButton::Create(wxWindow *parent,
|
|||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
wxString label(lbl);
|
wxString label(lbl);
|
||||||
if (label.empty() && wxIsStockID(id))
|
if (label.empty() && wxIsStockID(id) && !(id == wxID_HELP))
|
||||||
label = wxGetStockLabel(id);
|
label = wxGetStockLabel(id);
|
||||||
|
|
||||||
m_macIsUserPane = false ;
|
m_macIsUserPane = false ;
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
wxSize wxButton::DoGetBestSize() const
|
wxSize wxButton::DoGetBestSize() const
|
||||||
{
|
{
|
||||||
if ( GetId() == wxID_HELP )
|
if ( GetId() == wxID_HELP )
|
||||||
return wxSize( 20 , 20 ) ;
|
return wxSize( 23 , 23 ) ;
|
||||||
|
|
||||||
wxSize sz = GetDefaultSize() ;
|
wxSize sz = GetDefaultSize() ;
|
||||||
|
|
||||||
|
@@ -1044,7 +1044,7 @@ void wxWindowMac::SetLabel(const wxString& title)
|
|||||||
{
|
{
|
||||||
m_label = 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() ) ;
|
m_peer->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics), GetFont().GetEncoding() ) ;
|
||||||
|
|
||||||
// do not trigger refreshes upon invisible and possible partly created objects
|
// do not trigger refreshes upon invisible and possible partly created objects
|
||||||
|
Reference in New Issue
Block a user