]> git.saurik.com Git - wxWidgets.git/commitdiff
using button impl
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 2 Nov 2012 10:45:05 +0000 (10:45 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 2 Nov 2012 10:45:05 +0000 (10:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/tglbtn.mm

index 9066edca9f8e28e802bed36aaa7836f4f4775dc2..6a76c95f03e5afaac22d1f7e5ccd23d9047bac40 100644 (file)
@@ -44,7 +44,7 @@ wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer,
     SetBezelStyleFromBorderFlags(v, style);
 
     [v setButtonType:NSOnOffButton];
-    wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
+    wxWidgetCocoaImpl* c = new wxButtonCocoaImpl( wxpeer, v );
     return c;
 }
 
@@ -60,13 +60,13 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer,
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
 
+    SetBezelStyleFromBorderFlags(v, style);
+    
     if (label.IsOk())
         [v setImage:label.GetNSImage() ];
 
-    SetBezelStyleFromBorderFlags(v, style);
-
     [v setButtonType:NSOnOffButton];
-    wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
+    wxWidgetCocoaImpl* c = new wxButtonCocoaImpl( wxpeer, v );
     return c;
 }