Use wxStripMenuCodes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,7 +43,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
[m_cocoaNSView release];
|
[m_cocoaNSView release];
|
||||||
|
|
||||||
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
|
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
|
||||||
[GetNSButton() setTitle:wxNSStringWithWxString(label)];
|
[GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
|
||||||
[GetNSControl() sizeToFit];
|
[GetNSControl() sizeToFit];
|
||||||
|
|
||||||
if(m_parent)
|
if(m_parent)
|
||||||
@@ -73,7 +73,7 @@ wxString wxButton::GetLabel() const
|
|||||||
|
|
||||||
void wxButton::SetLabel(const wxString& label)
|
void wxButton::SetLabel(const wxString& label)
|
||||||
{
|
{
|
||||||
[GetNSButton() setTitle:wxNSStringWithWxString(label)];
|
[GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize wxButtonBase::GetDefaultSize()
|
wxSize wxButtonBase::GetDefaultSize()
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#endif //WX_PRECOMP
|
#endif //WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/cocoa/autorelease.h"
|
#include "wx/cocoa/autorelease.h"
|
||||||
|
#include "wx/cocoa/string.h"
|
||||||
|
|
||||||
#import <AppKit/NSButton.h>
|
#import <AppKit/NSButton.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
@@ -41,7 +42,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]);
|
SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]);
|
||||||
[m_cocoaNSView release];
|
[m_cocoaNSView release];
|
||||||
[GetNSButton() setButtonType: NSSwitchButton];
|
[GetNSButton() setButtonType: NSSwitchButton];
|
||||||
[GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]];
|
[GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
|
||||||
[GetNSControl() sizeToFit];
|
[GetNSControl() sizeToFit];
|
||||||
|
|
||||||
if(m_parent)
|
if(m_parent)
|
||||||
|
Reference in New Issue
Block a user