bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #22694] NSClipView is not calling adjustScroll:


From: Benhur Stein
Subject: [bug #22694] NSClipView is not calling adjustScroll:
Date: Thu, 03 Apr 2008 02:25:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080330 Firefox/2.0.0.13

Follow-up Comment #4, bug #22694 (project gnustep):

Well, it seems that macosx does no magic...

So, my suggestion is to implement a hidden method, 
say _scrollToPoint: in NSClipView as this:

- (void) _scrollToPoint: (NSPoint)aPoint
{
  NSRect proposedBounds;
  NSRect proposedVisibleRect;
  NSRect newVisibleRect;
  NSRect newBounds;

  // give documentView a chance to adjust its visible rectangle
  proposedBounds = _bounds;
  proposedBounds.origin = aPoint;
  proposedVisibleRect = [self convertRect: proposedBounds 
                                   toView: _documentView];
  newVisibleRect = [_documentView adjustScroll: proposedVisibleRect];
  newBounds = [self convertRect: newVisibleRect fromView: _documentView];

  [self scrollToPoint:newBounds.origin];
}

and change calls to scrollToPoint: inside NSClipView and
NSScrollView (except the last one, that changes the header
clip view) to calls to this new method.

I tested it, and it works fine. (or at least seems to)


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22694>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]