]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing styles, closes #11128
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 24 Sep 2009 08:05:17 +0000 (08:05 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 24 Sep 2009 08:05:17 +0000 (08:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/bmpbuttn.mm

index 1cbc2dfa81cf5a118d919cf4958cd6cdcafda84b..d3c0092ba0ad296c5ae12d13f3bfc4daf928226b 100644 (file)
@@ -38,13 +38,17 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
     if ( style & wxBORDER_NONE )
     {
         [v setBezelStyle:NSShadowlessSquareBezelStyle];
+        [v setBordered:NO]; 
     }
     else
     {
-        if ( style & wxBU_AUTODRAW )
-            [v setBezelStyle:NSShadowlessSquareBezelStyle];
-        else
+        // see trac #11128 for a thorough discussion
+        if ( (style & wxBORDER_MASK) == wxBORDER_RAISED )
             [v setBezelStyle:NSRegularSquareBezelStyle];
+        else if ( (style & wxBORDER_MASK) == wxBORDER_SUNKEN )
+            [v setBezelStyle:NSSmallSquareBezelStyle];
+        else
+            [v setBezelStyle:NSShadowlessSquareBezelStyle];
     }
 
     if (bitmap.Ok())