From 0ede427d8bc6a423b1f6b342ec08ca726b9b42a7 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 23 Jun 2003 23:08:20 +0000 Subject: [PATCH] (-drawLabel:inRect:): Use -drawInRect: instead of -drawAtPoint: to draw label. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17009 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSTabViewItem.m | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index f38058e2f..c494b3b7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-24 01:05 Alexander Malmberg + + * Source/NSTabViewItem.m (-drawLabel:inRect:): Update for change + in the behavior of -drawAtPoint:. Use -drawInRect: instead. + 2003-06-23 19:03 Alexander Malmberg * Source/NSStringDrawing.m (-drawAtPoint:): Place the text correctly diff --git a/Source/NSTabViewItem.m b/Source/NSTabViewItem.m index f9b382e2c..b8f365959 100644 --- a/Source/NSTabViewItem.m +++ b/Source/NSTabViewItem.m @@ -155,7 +155,7 @@ inRect:(NSRect)tabRect { NSGraphicsContext *ctxt = GSCurrentContext(); -// NSRect lRect; + NSRect lRect; NSRect fRect; NSDictionary *attr; NSString *string; @@ -197,13 +197,9 @@ [NSColor blackColor], NSForegroundColorAttributeName, nil]; - // For some unclear reason, somehow connected with clipping, - // drawInRect does not work here. But drawAtPoint works fine. - [string drawAtPoint: NSMakePoint(tabRect.origin.x, NSMaxY(tabRect)) - withAttributes: attr]; -// lRect = tabRect; -// lRect.origin.y += 3; -// [_label drawInRect: lRect withAttributes: attr]; + lRect = tabRect; + lRect.origin.y += 3; + [string drawInRect: lRect withAttributes: attr]; RELEASE(attr); DPSgrestore(ctxt);