Permalink
Browse files

draw edge with NSFrameRect

  • Loading branch information...
1 parent 68e45b2 commit 330dcb4ae9b326f3585e91fbb61eaf91335cc9dd @Watson1978 committed Nov 22, 2011
Showing with 3 additions and 21 deletions.
  1. +3 −21 PodCreator/ButtonBarView.rb
@@ -28,27 +28,9 @@ def drawRect(rect)
gradientRect = NSMakeRect(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height/2);
@gradient2.drawInRect(gradientRect, angle:270)
- NSColor.grayColor.set
- # draw bottom-edge line
- from = NSMakePoint(0, 0)
- to = NSMakePoint(rect.size.width, 0)
- NSBezierPath.strokeLineFromPoint(from, toPoint:to)
-
- # draw top-edge line
- from = NSMakePoint(0, rect.size.height)
- to = NSMakePoint(rect.size.width, rect.size.height)
- NSBezierPath.strokeLineFromPoint(from, toPoint:to)
-
- # draw left-edge line
- from = NSMakePoint(0, 0)
- to = NSMakePoint(0, rect.size.height)
- NSBezierPath.strokeLineFromPoint(from, toPoint:to)
-
- # draw right-edge line
- from = NSMakePoint(rect.size.width, 0)
- to = NSMakePoint(rect.size.width, rect.size.height)
- NSBezierPath.strokeLineFromPoint(from, toPoint:to)
-
+ # draw edge
+ NSColor.lightGrayColor.set
+ NSFrameRect(rect)
end
end

0 comments on commit 330dcb4

Please sign in to comment.