From 5504324af2e40c293ea1d921caf9f387bb545bf0 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Wed, 29 Dec 2010 17:21:15 +0000 Subject: [PATCH] * Source/NSMenuItemCell.m: Implement drawing a line in the menu separator item for the Windows95 and Mac modes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31797 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSMenuItemCell.m | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a4998da68..265acbb65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-12-29 12:31-EST Gregory John Casamento + + * Source/NSMenuItemCell.m: Implement drawing a line in the menu + separator item for the Windows95 and Mac modes. + 2010-12-29 Wolfgang Lux * Source/NSTextView.m (-_updateDragTargetLocation:operation:, @@ -39,6 +44,7 @@ Make sure the file name displayed in the panel has a valid extension. +>>>>>>> .r31796 2010-12-27 16:51-EST Gregory John Casamento * Source/GSThemeMenu.m: Changes for compiling with older compilers. diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m index 549710e21..b9d370526 100644 --- a/Source/NSMenuItemCell.m +++ b/Source/NSMenuItemCell.m @@ -36,7 +36,7 @@ #include #include "AppKit/NSAttributedString.h" -#include "AppKit/NSBox.h" +#include "AppKit/NSBezierPath.h" #include "AppKit/NSColor.h" #include "AppKit/NSEvent.h" #include "AppKit/NSFont.h" @@ -724,6 +724,19 @@ if (style == NSMacintoshInterfaceStyle || style == NSWindows95InterfaceStyle) { + NSBezierPath *path = [NSBezierPath bezierPath]; + NSPoint start = NSMakePoint(3, cellFrame.size.height/2 + + cellFrame.origin.y); + NSPoint end = NSMakePoint(cellFrame.size.width - 3, + cellFrame.size.height/2 + + cellFrame.origin.y); + + [[NSColor blackColor] set]; + + [path moveToPoint: start]; + [path lineToPoint: end]; + + [path stroke]; /* NSRect lineFrame = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y