From e00a2a29d424d8770a63d301b5d3778a0f8afcff Mon Sep 17 00:00:00 2001 From: rio Date: Wed, 5 Sep 2007 19:35:36 +0000 Subject: [PATCH] * Source/NSView.m (-scrollRect:by:): reversed the coordinates of destPoint (substract instead of add), to match OSX behaviour. * Source/NSClipView.m (-setBoundsOrigin): reversed the coordinates of the call to scrollRect:by:, to match OSX behaviour. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25458 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Source/NSClipView.m | 2 +- Source/NSView.m | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0ed933a2..c44c08728 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-09-05 Nicolas Roard + + * Source/NSView.m (-scrollRect:by:): reversed the coordinates + of destPoint (substract instead of add), to match OSX behaviour. + * Source/NSClipView.m (-setBoundsOrigin): reversed the coordinates + of the call to scrollRect:by:, to match OSX behaviour. + 2007-09-06 Fred Kiefer * Source/NSWindow.m (-sendEvent:, -selectKeyViewFollowingView:, diff --git a/Source/NSClipView.m b/Source/NSClipView.m index f02ae3f03..4f5202374 100644 --- a/Source/NSClipView.m +++ b/Source/NSClipView.m @@ -290,7 +290,7 @@ static inline NSRect integralRect (NSRect rect, NSView *view) NSRect redrawRect; /* Copy the intersection to the new position */ - [self scrollRect: intersection by: NSMakeSize(dx, dy)]; + [self scrollRect: intersection by: NSMakeSize(-dx, -dy)]; /* Change coordinate system to the new one */ [super setBoundsOrigin: newBounds.origin]; diff --git a/Source/NSView.m b/Source/NSView.m index 7ee2a14a8..9f61eb0ff 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -2825,8 +2825,8 @@ in the main thread. aRect = NSIntersectionRect(aRect, _bounds); // Don't copy stuff outside. destPoint = aRect.origin; - destPoint.x -= delta.width; - destPoint.y -= delta.height; + destPoint.x += delta.width; + destPoint.y += delta.height; [self lockFocus]; NSCopyBits(0, aRect, destPoint);