git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63838
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+extern "C" void SetBezelStyleFromBorderFlags(NSButton *v, long style);
+
// set bezel style depending on the wxBORDER_XXX flags specified by the style
void SetBezelStyleFromBorderFlags(NSButton *v, long style)
{
// set bezel style depending on the wxBORDER_XXX flags specified by the style
void SetBezelStyleFromBorderFlags(NSButton *v, long style)
{
#include "wx/tglbtn.h"
#include "wx/osx/private.h"
#include "wx/tglbtn.h"
#include "wx/osx/private.h"
+// from button.mm
+
+extern "C" void SetBezelStyleFromBorderFlags(NSButton *v, long style);
+
wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer,
wxWindowMac* WXUNUSED(parent),
wxWindowID WXUNUSED(id),
wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer,
wxWindowMac* WXUNUSED(parent),
wxWindowID WXUNUSED(id),
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
- [v setBezelStyle:NSSmallSquareBezelStyle];
+ SetBezelStyleFromBorderFlags(v, style);
+
[v setButtonType:NSOnOffButton];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
return c;
[v setButtonType:NSOnOffButton];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
return c;
wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer,
wxWindowMac* WXUNUSED(parent),
wxWindowID WXUNUSED(id),
wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer,
wxWindowMac* WXUNUSED(parent),
wxWindowID WXUNUSED(id),
- const wxBitmap& WXUNUSED(label),
const wxPoint& pos,
const wxSize& size,
const wxPoint& pos,
const wxSize& size,
long WXUNUSED(extraStyle))
{
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
long WXUNUSED(extraStyle))
{
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
- [v setBezelStyle:NSRegularSquareBezelStyle];
+ if (label.Ok())
+ [v setImage:label.GetNSImage() ];
+
+ SetBezelStyleFromBorderFlags(v, style);
+
[v setButtonType:NSOnOffButton];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
return c;
[v setButtonType:NSOnOffButton];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
return c;