]> git.saurik.com Git - wxWidgets.git/commitdiff
only draw separator line on the area adjacent to content, avoids double frames
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 19 Feb 2011 14:51:27 +0000 (14:51 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 19 Feb 2011 14:51:27 +0000 (14:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/toolbar.mm

index 91df28256dfabc956180657e67798467abacd910..8c1525df0018cf148cb8dbd7683781592d38ea7d 100644 (file)
@@ -1560,9 +1560,15 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
             
             dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH );
             dc.SetPen( wxPen( wxColour( 0x51,0x51,0x51 ) ) );
-            dc.DrawRectangle(rect);            
+            if ( HasFlag(wxTB_LEFT) )
+                dc.DrawLine(w-1, 0, w-1, h);
+            else if ( HasFlag(wxTB_RIGHT) )
+                dc.DrawLine(0, 0, 0, h);
+            else if ( HasFlag(wxTB_BOTTOM) )
+                dc.DrawLine(0, 0, w, 0);
+            else if ( HasFlag(wxTB_TOP) )
+                dc.DrawLine(0, h-1, w, h-1);
         }
-                
     }
     event.Skip();
 }