mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 14:50:38 +00:00
Restrict scrolled rectangle to the bounds of the view
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25203 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3f467c5e7f
commit
31694e8ec8
2 changed files with 10 additions and 3 deletions
|
@ -2684,8 +2684,10 @@ in the main thread.
|
|||
*/
|
||||
- (void) scrollRect: (NSRect)aRect by: (NSSize)delta
|
||||
{
|
||||
NSPoint destPoint = aRect.origin;
|
||||
NSPoint destPoint;
|
||||
|
||||
aRect = NSIntersectionRect(aRect, _bounds); // Don't copy stuff outside.
|
||||
destPoint = aRect.origin;
|
||||
destPoint.x -= delta.width;
|
||||
destPoint.y -= delta.height;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue